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.
Note: 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. Choose QA Metrics on the context menu. The Metric dialog box opens.
- In this dialog box:
- 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 Metric 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 Metric dialog box.
- For each metric there are settings for options such as limits and granularity in the right-hand panel of the Metric 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 the metrics are being processed.
Result: The Metric
dialog box opens automatically displaying the results.