Nondescriptive Block Name Metric
Metric ID
Metric ID:
mathworks.metrics.DescriptiveBlockNames
Description
Metric Type: Readability
Model Advisor Check ID:
mathworks.metricchecks.DescriptiveBlockNames
Run this metric to determine nondescriptive Inport, Outport, and Subsystem block names. Default names appended with an integer are nondescriptive block names. The results provide the nondescriptive block names at the model and subsystem levels.
This metric is available with Simulink®
Check™. To collect data for this metric, use getMetrics
with the metric identifier,
mathworks.metrics.DescriptiveBlockNames
.
The slmetric.metric.AggregationMode
property setting is
Sum
.
Computation Details
The metric:
Does not run on library models.
Analyzes content in masked subsystems.
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, Nondescriptive block name metric in By Task > Model Metrics > Readability Metrics. The Model Advisor check displays the number of nondescriptive Inport, Outport, and Subsystem block names in the model or subsystem. The check does not display the result for each type of block separately. 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 nondescriptive Inport, Outport, and Subsystem block names.AggregatedValue
: Number of nondescriptive Inport, Outport, and Subsystem block names for a component and its subcomponents.Measures
: 1-D vector containing:Total number of Inport blocks
Number of Inport blocks with nondescriptive names
Total number of Outport blocks
Number of Outport blocks with nondescriptive names
Total number of Subsystem blocks
Number of Subsystem blocks with nondescriptive names
AggregatedMeasures
: 1-D vector containing sum of:Total number of Inport blocks
Number of Inport blocks with nondescriptive names
Total number of Outport blocks
Number of Outport blocks with nondescriptive names
Total number of Subsystem blocks
Number of Subsystem blocks with nondescriptive names