Viewing static metrics
Static Metrics for C, C++ and Ada
Use the Metrics Viewer to view static testability measurements of the source files of your project. Source code metrics are created each time a source file is added to the project.
To compute static metrics without executing the application:
- In the Project Browser, select a node.
- From the Build menu, select Options or click the Build Options button in the toolbar.
- Clear all build options. Select only Source compilation and Static metrics.
- Click the Build toolbar button.
To open the Metrics Viewer:
- Right-click a node in the Asset Browser of the Project Explorer.
- From the pop-up menu, select View Metrics.
To manually open a report file:
- From the File menu, select Open... or click the Open icon in the main toolbar.
- In the Type box of the File Selector, select the .met Metrics File file type.
- Locate and select the metrics files that you want to open.
- Click OK.
Report Explorer
The Report Explorer displays the scope of the selected nodes, or selected .met metrics files. Select a node to switch the Metrics Window scope to that of the selected node.
Metrics Window
Depending on the language of the analyzed source code, different pages are available:
-
Root Page - File View: contains generic data for the entire scope
-
Root Page - Object View: contains object related generic data for C++ only
-
Component View: displays detailed component-related metrics for each file, class, method, function, unit, procedure, etc...
The metrics window offer hyperlinks to the actual source code. Click the name of a source component to open the Text Editor at the corresponding line.
Related Topics
Root Level File View | Root Level Object View | Static Metrics | Exporting reports