microsoft / powerbi-visuals-histogram
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 95 units with 1,740 lines of code in units (77.8% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (433 lines of code)
    • 16 medium size units (530 lines of code)
    • 31 small units (479 lines of code)
    • 42 very small units (298 lines of code)
0% | 24% | 30% | 27% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 24% | 30% | 27% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 24% | 30% | 27% | 17%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function createScale()
in src/axisHelper.ts
88 29 1
83 8 4
export function createAxis()
in src/axisHelper.ts
76 13 1
public update()
in src/visual.ts
69 12 1
59 9 11
private getXPoints()
in src/visual.ts
58 15 0
private renderColumns()
in src/visual.ts
50 6 0
private getLabelLayout()
in src/visual.ts
43 2 0
public calculateXAxes()
in src/visual.ts
40 3 3
constructor()
in src/visual.ts
37 1 1
37 10 2
36 14 3
34 6 4
private renderLegend()
in src/visual.ts
34 3 0
33 7 1
33 3 4
29 4 1
private calculateYAxes()
in src/visual.ts
27 2 2
25 8 5
private renderLabels()
in src/visual.ts
25 3 0