It is a good start to get an overview of the quality of your application at a give time.
The next step to take the right decisions is to be able to know how quality evolves.
Time Machine 2.0
A default Time Machine dashboard comes out-of-the-box. It is built with Timeline and History table widgets:
Note that you can mouse over the timeline to display the different values.
Obviously, metrics to be displayed can be chosen in the widget settings:
History Table Widget
Obviously, metrics to be displayed and number of versions to display can be chosen in the widget settings:
Delete A Quality Snaphshot
Whatever the reason (wrong quality profile, issue with analysis, etc.), you now have the ability to remove a snapshot to polish your history charts:
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.
Deprecated - Previous version of the TimeMachine
Exploring the TimeMachine
Wherever in a project, it is always possible to access the Time Machine functionality through the left menu.
The Time machine enables to reply the past by looking at a series of past analysis. The Time machine page is divided into 4 sections.
The custom chart
This chart represent a timeline from the first ever analysis to the last ever analysis. On this timeline will appear all the metrics that are ticked below
To change the metrics appearing on the chart, tick the metrics you are interested in and press at the bottom of the page. The chart is then regenerated with the chosen metrics.
Every event, either generated or manually entered appear on the chart as vertical doted lines.
It possible to change the default metric appearing on the chart by clicking on Set as default.
The chosen analysis
When launching the Time Machine, Sonar displays the first snapshot ever and the last 5 events in the system.
It is possible to add snapshots to the view : snapshots can be selected either by date
or by events (only version events will be listed)
It is possible to hide a snapshot from the view by using the hide link next to the snapshot to be removed
The metric table
On the left of this table will appear the list of all possible metrics (grouped by families) stored in the system, including the manual metrics. Each column represents a snapshot and will display the measure for the metric. At the right of the table appears a sparkline showing the evolution of the chosen snapshots.
The complexity chart
This chart compares the repartition of the classes complexity between all the chosen snapshots.