When looking at the code quality of an application and trying to decide on a plan of action, it is not always enough to get a snapshot of the quality at a given time. You also need some visibility into the application history to take the right decision.
For example, let's say that you have defined a requirement that each application should have a coverage by unit tests of 60%. And let's say that one of your application has 50% coverage. Without historical data, you can only conclude that the team does not write sufficient unit tests and that it should become the next focus of attention. But let's now say that a couple of months ago the coverage for this application was 20%... then you would probably conclude that although the requirement is not made yet, the team is doing a very good job and that no special focus needs to be put on unit tests. This is why having access to historical information is important.
Historical information is provided through the Time Machine and the Tendencies.
The Time Machine is made of two generic widgets that can be added to any dashboard.
The Timeline widget provides the ability to display a chart containing historical data of up to 3 metrics. Passing your mouse over the timeline will display the different values.
By default, historical information is not kept on directories/packages and therefore the timeline has no values to display below the project or module level. This can be changed by logging in as a System administrator, going to Settings > General Settings > General > Database Cleaner and setting the Clean history data of directories/packages property to false. Note that this will increase the volume of data to be stored in the database.
This widget can be customized:
The History Table widget provides the capability to display a table with the historical data for up to 10 metrics:
This widget can be customized:
A default Time Machine dashboard comes out-of-the-box. This is a combination of Timeline and History Table widgets:
The tendencies are arrows that are displayed next to metrics in the dashboards. Those arrows show the trend for the measure.
There are five different levels of tendency
Black arrows are used to represent tendencies on the quantitative metrics (the ones that does not reflect quality, for example number of lines of code).
Red or green arrows are used to represent tendencies on the qualitative metrics (the ones that reflects quality, for example code coverage). Red is used when the quality decreases, green when it increases.
To compute the tendencies, using a simple difference between the last two measures of each metric would not be accurate enough. Therefore a more advanced algorithm is implemented: the least squares method. It is a linear regression analysis that helps remove the noise in order to determine a trend on discrete measures. In other words, all the measure in the last XX days are taken into account, then the set of measures is checked to see if it makes sense (by testing the correlation rate), and an estimated slope is computed and displayed using 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 tendencies by logging in as a System administrator and going to Settings > General Settings > General > Differential Views. To configure the number of days used to compute tendencies, set the Tendency period property to the desired number of days. Default is 30.