microsoft / powerbi-visuals-gantt
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 80 units with 2,160 lines of code in units (67.3% of code).
    • 3 very long units (489 lines of code)
    • 7 long units (466 lines of code)
    • 23 medium size units (710 lines of code)
    • 26 small units (381 lines of code)
    • 21 very small units (114 lines of code)
22% | 21% | 32% | 17% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts22% | 21% | 32% | 17% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src22% | 21% | 32% | 17% | 5%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
220 73 9
165 25 2
public update()
in src/gantt.ts
104 22 1
89 18 2
78 4 1
70 18 5
66 10 2
57 6 2
54 8 2
private groupTasks()
in src/gantt.ts
52 11 1
46 8 1
42 3 6
41 10 5
38 15 4
public bindEvents()
in src/behavior.ts
37 6 2
37 5 2
35 1 0
35 12 2
33 11 2
31 10 3