Metrics

In the Metrics tab you can select and configure the metrics to be displayed for each function block in the Standard Metrics view when the command 'View Standard Metrics' is executed.

Metrics 1:
Metrics 2:

Analysis of libraries

The following metrics are also output for the libraries integrated in the project: code size, variable size, stack size and number of calls.

Metrics 3:

Compilation errors for violations of upper/lower limits

You can use rule SA0150 of the static code analysis to output violations of the upper and lower limits of the activated metrics as compilation errors.

Configuration of the metrics

Active

You can enable or disable the individual metrics using the checkbox for the respective row. When command 'View Standard Metrics' is executed, the metrics that are enabled in the respective configuration are shown for each programming block in the Standard Metrics view.

  • Metrics 4:: The metric is disabled and is not displayed in the Standard Metrics view when the command View Standard Metrics is executed.
  • Metrics 5:: The metric is enabled and is displayed in the Standard Metrics view when the command View Standard Metrics is executed.

Lower limit

For each metric you can define an individual upper and lower limit by entering the required number in the respective metric row.

If a metric is only limited in one direction, you can leave the configuration for the other direction blank. In other words, you may specify either only the lower limit or only the upper limit.

Upper limit

Evaluation of the upper and lower limits

The set upper and lower limits you can be evaluated in two ways.

 

Overview and description of the metrics

An overview of the metrics and a detailed description of the rules can be found in the next chapter.