Documentation

Collect Model Metric Data by Using the Metrics Dashboard

To collect model metric data and assess the design status and quality of your model, use the Metrics Dashboard. The Metrics Dashboard provides a view into the size, architecture, and guideline compliance for your model.

  1. Open the model by typing sldemo_fuelsys.

  2. In the model window, open the Metrics Dashboard by selecting Analysis > Metrics Dashboard.

  3. To collect metric data for this model, click the All Metrics icon.

    The Metrics Dashboard provides a view into the size, architecture, and guideline compliance for your model. In the ARCHITECTURE section of the dashboard, locate the Model Complexity widget. This widget is a visual representation of the distribution of complexity across the components in the model hierarchy. For each complexity range, a colored bar indicates the number of components that fall within that range. Darker colors indicate more components. In this case, several components have a cyclomatic complexity value in the lowest range, while just one component has a higher complexity.

  4. To drill into model complexity details at the model, subsystem, and chart level, click anywhere in the Model Complexity widget.

  5. To sort the components by complexity, click the column header, Model Complexity. In this example, the control_logic chart is the most complex.

  6. To see this component in the model, click the control_logic hyperlink.

  7. Once you have used the dashboard to determine the high complexity components in your model, you can reduce complexity by refactoring your model. In this case, refactoring the control_logic chart by moving logic into atomic subcharts reduces the complexity for that component.

Related Topics

Was this topic helpful?