|Table of Contents|
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.
How To Read Tendencies?
Sonar uses 5 levels to describe the tendency of a measure. Each level is represented by an arrow:
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 in green 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 to compute tendencies. See the Tendency Settings section for more information.
To configure tendency settings, log in as an administrator and go to Configuration > Differential Views.
- To activate/deactivate the computation of tendencies, set the Skip tendencies property to true/false. Default is true.
- To configure the number of days used to compute tendencies, set the Tendency period property to the desired number of days. Default is 30.