Contenido principal

executeDashboardMetrics

Collect metrics for specific dashboard

Since R2026a

    Description

    executeDashboardMetrics(metricEngine,Dashboard=dashboardIdentifier) collects metrics for the specified dashboard.

    example

    Examples

    collapse all

    To collect metrics for the Project Model Testing dashboard programmatically, you can call the executeDashboardMetrics function on the metric engine.

    Open a project that includes the models and testing files. For this example, in the MATLAB® Command Window, enter:

    openExample("slcheck/ExploreTestingMetricDataInModelTestingDashboardExample");
    openProject("cc_CruiseControl");

    Create a metric.Engine object for the project.

    metric_engine = metric.Engine();

    Update the trace information for metric_engine to ensure that the artifact information is up to date.

    updateArtifacts(metric_engine)

    Collect metric data by executing the metrics associated with the Project Model Testing dashboard.

    executeDashboardMetrics(metric_engine,Dashboard="ProjectModelTesting")

    To view project metric results, use the widgets in the Project Model Testing dashboard as shown in Summarize Status of Testing for Project.

    Input Arguments

    collapse all

    Metric engine object for which you want to collect metric results, specified as a metric.Engine object.

    Dashboard identifier, specified as one of these values:

    • "ModelMaintainability" — Return the model maintainability metric identifiers used by the Model Maintainability Dashboard.

    • "ModelUnitPILTesting" — Return the processor-in-the-loop (PIL) code testing metric identifiers used by the PIL Code Testing dashboard.

    • "ModelUnitSILTesting" — Return the software-in-the-loop (SIL) code testing metric identifiers used by the SIL Code Testing dashboard.

    • "ModelUnitTesting" — Return the model testing metric identifiers used by the Model Testing Dashboard.

    • "ProjectModelTesting" — Return the project model testing metric identifiers used by the Project Model Testing dashboard.

    Example: "ProjectModelTesting"

    Version History

    Introduced in R2026a