Go Up to Working with Metrics Index
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 not available for design projects.
To run metrics:
- Open a project.
- Open your source code file in the Code Editor. Click the Project > QA Metrics menu command.
- Only for implementation projects. You can also open the Model View, right-click the project root node and select QA Metrics on the context menu.
- In the Metrics 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.