Configuring Analyzer and Reports

Metrics Analyzer Configuration

Metric Reports Configuration

Source Code Metrics Template File

Metrics Analyzer Configuration

The analytical properties of the metrics which can be adjusted are:

Acceptable border values for each metrics report.

Operator weight.

A list of types of warnings to be displayed in the Message Logs as a result of a wrong parameter value.

All the enumerated properties of the metrics can be adjusted in the dialog which appears upon choosing the Options > Software Metrics Analyzer command.

The selected default configuration is saved within the metrics template.

The details of adjusting the visual elements of metrics reports are given in the Reference Manual.

Metric Reports Configuration

DA-C offers the possibility of setting default visual properties of the metrics, as well as of setting the form in which particular metrics reports will appear.

The Options > Metrics command leads to the dialog box for setting default visual elements of metrics reports. Changes in the configuration will relate only to the next metrics report to be created. The existing metrics reports cannot be changed in this way.

Each individual metrics report can be adjusted by choosing the Chart Options command from the toolbar, for the report specified. If the form in which the metrics report is to appear is adjusted in this manner, it will not affect the default values set in the Options > Metrics dialog box.

The selected default configuration, as well as the individual configuration of each of the existing metrics reports, is saved within the metrics template.

Metrics report dimensions can be set in millimeters or in inches. The choice of unit can be made in the Options > Project, Miscellaneous tab, Measurement Units group. This selection also influences the other functionalities in DA-C (Graph, Editor, and so on).

The report dimensions specified will be used only when printing the metrics report. The report displayed on the screen will be a diminished or enlarged image of the printed report, with proportions retained.

The details of adjusting the visual elements of metrics reports are given in the Reference Manual.

Source Code Metrics Template File

The metrics template defines a possible view of the Source Code Metrics of a project. It is made up of one or more metrics contexts together with the metrics configuration.

The metrics template, just like the metrics context, is distinct from metrics data. A single metrics template a view of metrics can be applied to various projects, functions, modules, which enables you to view various logical wholes using a once-established criterion.

It is easiest to describe a metrics template as a set of metrics configuration and reports, but without specific metrics data.

Using metrics templates, it is possible to predefine many different views of the Source Code Metrics of a project. The metrics template of the Project Explorer (based on the criteria for project headway, estimates of time needed, and so on) will differ from the metrics template of the quality control department (which measures comment quality and extent, code complexity, and so on). In this way, the source code can at any time be checked from the aspect of quality control, meaning that as early as in the development stage, quality can be built it and the number of iterations "comments and corrections" reduced.

The following operations have been defined over the metrics template:

Creating a new metrics template;

Saving a metrics template to a file;

Reading a saved metrics template from a file.

When you save a metrics template, all existing metrics reports are saved in a file with an .MET extension. The metrics data alone does not belong to the metrics template and is saved by a different procedure, in a different location, the Metrics database. It is possible to open a metrics template saved in this manner from a different project and to apply metrics reports to the data of that project.

If the metrics template has been changed by adding a new metrics report or by altering one of the existing reports, you will be asked to save the changes on closing. Each newly-opened window with a metrics report is assigned to the currently active metrics template.

When a new project is created, an empty metrics template, which does not contain metrics reports, is automatically created with it. Once changes have been made in the metrics, the metrics template can be saved, at which time it can be named and its name is associated with the active project. The name of the active template is saved on closing the project, so that the project is opened each time together with the metrics template active during the previous session.

The name of the active metrics template is displayed on the DA-C status bar, as shown in following figure (the name of the template is "Complexity"). The asterisk before the name of the template signifies that the metrics template has been changed since it was last saved.

All visual adjustments of individual metrics reports are saved in the metrics template file. Default values of visual attributes of metrics reports set using the Options > Source Code Metrics Charts command, as well as border values of metrics set using the Options > Software Metrics Analyzer command are also saved.