Main Content

Library Link Metric

Metric ID

Metric ID: mathworks.metrics.LibraryLinkCount

Description

Metric Type: Size

Model Advisor Check ID: mathworks.metricchecks.LibraryLinkCount

Use this metric to calculate the number of library-linked blocks in the model. The results provide the number of library-linked blocks at the model and subsystem level.

This metric is available with Simulink® Check™. To collect data for this metric, use getMetrics with the metric identifier, mathworks.metrics.LibraryLinkCount.

The slmetric.metric.AggregationMode property setting is Sum.

Computation Details

The metric:

  • Runs on library models.

  • Analyzes content in masked subsystems.

  • Does not count subsystems linked to MathWorks® libraries.

  • If specified, analyzes the content of library-linked blocks or referenced models.

Collection

To collect results for this metric using the Model Advisor, run the check, Library link metric in By Task > Model Metrics > Count Metrics. The Model Advisor check displays the number of library links in the model or the subsystem. The check does not analyze referenced models or return aggregated results.

Results

For this metric, instances of slmetric.metric.Result provide the following results:

  • Value: Number of library linked blocks.

  • AggregatedValue: Number of library linked blocks for a component and its subcomponents.

  • Measures: Not applicable.

See Also

Related Topics