Skip to end of metadata
Go to start of metadata

Tendencies

What are Tendencies ?

The tendencies are visible in every screen, from portfolio to class view, and are materialized by little arrows next to each measure. Those arrows show the trend for the measure.
This page intends to explain how to read them, how Sonar makes their calculation and how they can be used.

How to read Tendencies ?

Sonar uses 5 levels to describe the tendency of a measure. Each level is represented by an arrow :

Strong increase

Medium increase

 

Neutral

Medium decrease

Strong decrease

Sonar uses black ( ) arrows to represent tendencies on the quantitative metrics (the ones that are not reflecting quality of the code, for example number of lines of code).

Sonar uses red ( ) or green ( ) arrows to represent tendencies on the qualitative metrics (the ones that are reflecting quality of the code, for example code coverage). The red is used when the quality decreases, the green when it increases.

Of course, it is to be noted that if the percentage of duplicated lines decreases it will be represented by because it is considered as an improvement.

How are Tendencies calculated ?

In order to display the tendencies, making a simple difference between the last two measures of each metric would not be accurate enough. Therefore Sonar implements a more advanced algorithm : the least squares method. The least squares is a linear regression analysis that helps removing the noise in order to determine a trend on discrete measures.
In other words, Sonar takes all the measure taken in the last XX days, checks that the set of measures makes some sense (by testing the correlation rate), determines an estimated slope and displays it using the arrows.
It is to be noted that the algorithm currently considers that measures are taken at a constant frequency.
It is possible to configure the number of days used by the tendencies. See Configure core plugin for more details.

Labels: