microsoft / azure-pipelines-task-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 192 units with 2,944 lines of code in units (42.7% of code).
    • 2 very long units (296 lines of code)
    • 9 long units (605 lines of code)
    • 25 medium size units (756 lines of code)
    • 47 small units (706 lines of code)
    • 109 very small units (581 lines of code)
10% | 20% | 25% | 23% | 19%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts12% | 24% | 21% | 22% | 18%
js0% | 0% | 41% | 31% | 27%
cs0% | 0% | 62% | 23% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
node11% | 22% | 23% | 23% | 19%
powershell0% | 0% | 40% | 27% | 31%
powershell/CompiledHelpers0% | 0% | 62% | 23% | 13%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private execWithPiping()
in node/toolrunner.ts
169 32 2
127 41 4
85 30 4
public exec()
in node/toolrunner.ts
83 11 1
export function find()
in node/task.ts
76 18 2
65 20 2
export function _which()
in node/internal.ts
63 20 2
60 16 4
60 23 4
57 18 3
export function rmRF()
in node/task.ts
56 12 1
48 12 1
private _argStringToArray()
in node/toolrunner.ts
44 12 1
38 13 1
private _getSpawnArgs()
in node/toolrunner.ts
37 11 1
36 8 1
export function _loadData()
in node/internal.ts
36 13 0
private _getCommandString()
in node/toolrunner.ts
33 7 2
public VstsWebProxy()
in powershell/CompiledHelpers/VstsTaskSdk.cs
33 7 4
public static extern SafeFindHandle FindFirstFile()
in powershell/CompiledHelpers/VstsTaskSdk.cs
33 1 1