microsoft / powerbi-visuals-sunburst
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 21 units with 442 lines of code in units (72.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (121 lines of code)
    • 2 medium size units (73 lines of code)
    • 16 small units (238 lines of code)
    • 1 very small units (10 lines of code)
0% | 27% | 16% | 53% | 2%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 27% | 16% | 53% | 2%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 27% | 16% | 53% | 2%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public update()
in src/Sunburst.ts
63 20 1
private render()
in src/Sunburst.ts
58 6 1
constructor()
in src/Sunburst.ts
49 1 1
public bindEvents()
in src/behavior.ts
24 3 2
20 1 1
19 1 1
18 1 1
17 1 1
private enumerateColors()
in src/Sunburst.ts
17 3 2
16 1 1
private partition()
in src/Sunburst.ts
16 1 1
public renderSelection()
in src/behavior.ts
16 3 1
15 1 1
14 1 1
13 1 1
12 1 1
12 2 2
11 1 1
11 4 1
function getFillOpacity()
in src/behavior.ts
11 5 4