microsoft / powerbi-visuals-sampleslicer
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 64 units with 1,004 lines of code in units (62.8% of code).
    • 1 very long units (104 lines of code)
    • 3 long units (155 lines of code)
    • 14 medium size units (418 lines of code)
    • 9 small units (126 lines of code)
    • 37 very small units (201 lines of code)
10% | 15% | 41% | 12% | 20%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts10% | 15% | 41% | 12% | 20%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src10% | 15% | 41% | 12% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
min: greaterThen ? Number()
in src/sampleSlicer.ts
104 13 1
public static converter()
in src/sampleSlicer.ts
52 9 5
private enterSelection()
in src/sampleSlicer.ts
52 1 1
private initRangeSlicer()
in src/sampleSlicer.ts
51 3 1
private getGroupedData()
in src/tableView.ts
50 16 0
private initContainer()
in src/sampleSlicer.ts
36 1 0
33 8 3
private initTableView()
in src/sampleSlicer.ts
32 2 0
public convert()
in src/sampleSlicerConverter.ts
32 9 1
public update()
in src/sampleSlicer.ts
30 9 1
29 13 2
public bindEvents()
in src/selectionBehavior.ts
28 2 2
private restoreRangeFilter()
in src/sampleSlicer.ts
27 15 1
private initSearchWidget()
in src/sampleSlicer.ts
26 1 1
public updateOnRangeSelectonChange()
in src/selectionBehavior.ts
26 9 0
private initNoUISlider()
in src/sampleSlicer.ts
25 1 1
private updateInternal()
in src/sampleSlicer.ts
23 4 1
private updateTableView()
in src/sampleSlicer.ts
21 4 1
max: lessThen ? Number()
in src/sampleSlicer.ts
18 5 1
private setTotalRows()
in src/tableView.ts
18 5 0