7.14.  Examining Metrics Results

Sonargraph calculates metrics on different abstraction levels and displays them in the Metrics view. Metrics are calculated on different levels. Select the level in the combo box at the top left of the view and select the metric in the shown table. The list of metric values is then displayed in the first tab on the right. The scope (i.e. for the whole system or a single module) can be selected via the combo box at the top right of the view. The complete set of metric values can be exported via the context menu. Some basic statistics like average, standard deviation, median, minimum and maximum values are displayed below the list of values on the right.

Metrics View
Figure 7.60. Metrics View


The histogram for the selected metric and scope is shown in the second tab on the right. The chart can be exported as an image via the context menu. The pie chart is only available for metrics with a defined threshold.

Metrics Histogram
Figure 7.61. Metrics Histogram


If you are interested in all metrics of a specific element, the Element Metrics view can be opened via the main menu "Window""Show View"Element Metrics.

Element Metrics View
Figure 7.62. Element Metrics View


The metric thresholds configuration allows to define threshold values for those predefined metrics in order to have an accurate control of the behavior of your code base as it evolves.

Metric Thresholds Configuration
Figure 7.63. Metric Thresholds Configuration


Thresholds can also be defined, edited or deleted via context menu by right clicking on a metric in the Metrics or Element Metrics view.

Related topics: