GerritCodeReview / plugins_code-coverage
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 41 units with 394 lines of code in units (80.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (63 lines of code)
    • 3 medium size units (89 lines of code)
    • 3 small units (49 lines of code)
    • 34 very small units (193 lines of code)
0% | 15% | 22% | 12% | 48%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 16% | 23% | 12% | 47%
java0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
resources/static0% | 16% | 23% | 12% | 47%
java/com/googlesource/chromium/plugins/coverage0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
convertResponseJsonToCoverageRanges()
in src/main/resources/static/coverage.js
63 14 1
async fetchCoverageJsonData()
in src/main/resources/static/coverage.js
37 9 2
convertResponseJsonToCoveragePercentages()
in src/main/resources/static/coverage.js
31 7 1
constructor()
in src/main/resources/static/coverage.js
21 1 1
updateCoverageDataIfNecessary()
in src/main/resources/static/coverage.js
19 6 1
async showPercentageColumns()
in src/main/resources/static/coverage.js
16 4 0
static get properties()
in src/main/resources/static/coverage-percentage-views.js
14 1 0
async _computePercentage()
in src/main/resources/static/coverage-percentage-views.js
10 7 4
parseProjectFromPathName()
in src/main/resources/static/coverage.js
10 3 1
getNormalizedHost()
in src/main/resources/static/coverage.js
9 3 1
prefetchCoverageRanges()
in src/main/resources/static/coverage.js
9 1 2
function onAttached()
in src/main/resources/static/chromium-coverage.js
8 2 1
static get properties()
in src/main/resources/static/coverage-percentage-views.js
8 1 0
public Response apply()
in src/main/java/com/googlesource/chromium/plugins/coverage/GetConfig.java
8 1 1
async provideCoverageRanges()
in src/main/resources/static/coverage.js
7 3 4
changeNum: parseInt()
in src/main/resources/static/coverage.js
7 1 1
async provideCoveragePercentages()
in src/main/resources/static/coverage.js
7 2 3
_computeCoverageClass()
in src/main/resources/static/coverage-percentage-views.js
6 2 1
static get template()
in src/main/resources/static/coverage-percentage-views.js
6 1 0
static get template()
in src/main/resources/static/coverage-percentage-views.js
6 1 0