Before running metrics, make sure that the code being analyzed can be compiled. If your source code contains errors or some libraries and paths are not included, metrics might produce inaccurate results.
Warning: This feature is available for implementation projects only.
To run metrics:
- Open an implementation project.
- Open the Model View.
- Right-click the project root node. QA Metrics on the context menu. The Metrics dialog window opens.
- In this dialog window:
- In Scope, choose what to run metrics on: Model processes the entire project.
- Selection processes only the specific classes, packages, or diagrams currently selected in the diagram or Model View.
- Choose the metrics you want to analyze. Each metric displays a description in the lower panel of the Metrics dialog box.
Tip: If nothing is currently selected in the diagram or navigator view, the Selection scope is not available. If you want to run metrics on specific classes, packages, or diagrams, make sure you correctly select them before you open the Metrics dialog window.
- For each metric there are settings for options such as limits and granularity in the right-hand panel of the Metrics dialog box. Change the settings if necessary.
- When you have selected your set of metrics, click Start.
Note: Metrics run in the command thread, so you cannot edit the project while they are being processed.
Result: The Metrics Results Pane opens automatically displaying the results.