Name | Sonar Abacus Plugin |
License | LGPL v3 |
Authors | David FRANCOIS David RACODON |
Jira | TBD |
Sources | |
Latest version | 0.1-SNAPSHOT |
Download | Snapshot for tests: http://snapshots.repository.codehaus.org/org/codehaus/sonar-plugins/sonar-abacus-plugin/0.1-SNAPSHOT/sonar-abacus-plugin-0.1-SNAPSHOT.jar |
Description
This plug-in estimates the complexity of each component in order to help you use the "abacus methodology" ("méthode des abaques" in French).
This is a methodology widely use in France to estimate the effort of changes.
Example of abacus
| Complexity of the Change | |||||
Simple | Medium | Complex | Very complex | ||
|---|---|---|---|---|---|
Complexity of the Component | Simple | 0.1 | 0.3 | 0.8 | 1.5 |
| Medium | 0.3 | 0.6 | 1.8 | 3.0 | |
| Complex | 0.6 | 1.2 | 3.0 | 5.0 | |
| Very complex | 1.0 | 2.0 | 5.0 | 8.0 | |
Examples :
- According to this abacus, the effort of a complex change in a simple component would be estimated to 0.8 man days.
- According to this abacus, the effort of a very complex change in a complex component would be estimated to 5.0 man days.
Features
The complexity of a component is computed according to its cyclomatic complexity.
The defaut values are:
| Abacus Complexity | Cyclomatic Complexity |
|---|---|
| Simple | <= 10 |
| Medium | 10 < X <= 30 |
| Complex | 30 < X <= 60 |
| Very complex | > 60 |
See the Configuration section to set your own thresholds.
At file level, you can either use the Sonar Tab Metric Plugin or create a filter to display the abacus complexity metric.
| Compatibility issue with Sonar Tab Metrics Plugin Note that the Sonar Tab Metrics Plugin is still under development. The issue about displaying string metrics has not been solved yet. That's why the abacus complexity metric is not currently displayed in the new Metrics tab. |
At module or project level, a widget is available to display the abacus complexity and the abacus complexity distribution.
The abacus complexity distribution can be displayed either in number of files or percentage.
See screenshots below.
???Insert numberOfFilesDistribution.PNG here???
???Insert percentageDistribution.PNG here???
Why using this plug-in?
- To help you estimate your effort of change more accurately and in a quicker way.
- To help clients and subcontractors argue less about the effort of change as they will have a factual way to estimate the complexity of each component.
Installation
- Copy the jar into /extensions/plugins/ directory
- Restart Sonar Web server
Configuration
Properties
| Property | Default value | Description |
|---|---|---|
| sonar.abacus.complexityThresholds | Simple:10;Medium:30;Complex:60;Very Complex | To set your own thresholds to compute the abacus complexity. Usage: ThresholdName1:ThresholdComplexity1;ThresholdName2:ThresholdComplexity2;...;ThresholdNameN |
Widget parameters
| Parameter | Default value | Description |
|---|---|---|
| defaultColors | 33cc33,ffff33,ff9900,ff0033,000000 | Coma-separated list of colors (hexadecimal format) for the pie chart display. Make sure to have at least as many colors as levels of complexity in your abacus. Default value is green, yellow, orange, red and black. |
| defaultDisplay | files | To set the default display: number of files distribution or percentage distribution. Possible values:
|
Known Limitations
- Drill-down from the abacus complexity of a component does not work due to the following issue in Sonar Core: SONAR-3233.
- Differential views are not implemented.
- Compatibility with VIEWS: as each project can define its own abacus, this plug-in does not compute the abacus complexity and distribution for a view.
Changelog
TBD

