microsoft / azure-pipelines-tool-lib
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 49 units with 784 lines of code in units (50.0% of code).
    • 1 very long units (128 lines of code)
    • 1 long units (54 lines of code)
    • 6 medium size units (199 lines of code)
    • 14 small units (241 lines of code)
    • 27 very small units (162 lines of code)
16% | 6% | 25% | 30% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js33% | 0% | 11% | 30% | 23%
ts0% | 13% | 38% | 30% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT16% | 6% | 25% | 30% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
128 19 0
54 8 3
45 14 0
44 4 3
33 9 2
29 8 3
24 3 1
24 4 2
var run = function()
in make-util.js
20 7 3
20 2 0
20 5 1
20 4 2
19 2 1
19 4 4
19 3 5
18 5 3
17 6 2
16 4 3
14 3 1
14 1 0