Main Content

Clone Detection Metric

Metric ID

Metric ID: mathworks.metrics.CloneDetection

Description

Metric Type: Architecture

Use this metric to count the number of clones in a model. Clones must have identical block types and connections but they can have different parameter values. This metric is available with Simulink® Check™. To collect data for this metric, use getMetrics with the metric identifier, mathworks.metrics.CloneDetection.

The slmetric.metric.AggregationMode property setting is Sum.

Computation Details

  • Analyzes content in masked subsystems.

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

Results

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

  • Value: Number of clones.

  • AggregatedValue: Number of clones for component and its subcomponents.

  • Measures: Not applicable.

See Also

Related Topics