microsoft / cookie.gulp
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 88 units with 1,204 lines of code in units (24.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (55 lines of code)
    • 21 medium size units (550 lines of code)
    • 24 small units (339 lines of code)
    • 42 very small units (260 lines of code)
0% | 4% | 45% | 28% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 4% | 45% | 28% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
core/processors0% | 43% | 26% | 11% | 17%
core0% | 0% | 48% | 27% | 24%
electron-installer0% | 0% | 51% | 34% | 13%
wix0% | 0% | 62% | 20% | 17%
tsc0% | 0% | 36% | 43% | 20%
ROOT0% | 0% | 0% | 56% | 43%
core/tasks0% | 0% | 0% | 0% | 100%
tslint0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
transform()
in core/processors/licensing.js
55 16 3
function msi()
in wix/msi.js
44 8 4
41 18 0
36 11 2
flush()
in core/processors/licensing.js
34 4 1
33 11 2
flush()
in tsc/tsc.js
31 9 1
function heat()
in wix/heat.js
24 5 1
flush()
in wix/light.js
24 4 1
function toGlob()
in core/glob-utils.js
23 7 2
23 8 0
flush()
in wix/candle.js
23 3 1
flush()
in wix/heat.js
23 8 1
22 7 0
write()
in core/log.js
22 7 2
function generateIconOptions()
in electron-installer/deb.js
21 8 1
function constructProcessor()
in electron-installer/deb.js
21 4 4
platform: toPackagerPlatform()
in electron-installer/pack.js
21 1 1
function generateIconOptions()
in electron-installer/rpm.js
21 8 1
function constructProcessor()
in electron-installer/rpm.js
21 4 4