microsoft / powerbi-visuals-pulsechart
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,714 lines of code in units (72.0% of code).
    • 2 very long units (436 lines of code)
    • 5 long units (345 lines of code)
    • 13 medium size units (388 lines of code)
    • 18 small units (268 lines of code)
    • 50 very small units (277 lines of code)
25% | 20% | 22% | 15% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts25% | 20% | 22% | 15% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src25% | 20% | 22% | 15% | 16%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private drawTooltips()
in src/visual.ts
222 30 1
214 72 4
constructor()
in src/animator.ts
99 1 2
private renderXAxis()
in src/visual.ts
71 9 2
private renderGaps()
in src/visual.ts
67 2 2
private drawDots()
in src/visual.ts
57 12 1
51 13 5
41 7 8
public renderChart()
in src/visual.ts
36 3 0
34 5 2
public render()
in src/animator.ts
33 15 0
33 14 1
32 2 1
public update()
in src/visual.ts
31 7 1
private renderYAxis()
in src/visual.ts
26 10 2
26 2 2
25 5 2
public playAnimation()
in src/visual.ts
25 3 1
private getYAxisScales()
in src/visual.ts
23 6 1
public render()
in src/visual.ts
23 5 1