microsoft / PowerBI-visuals-PowerKPIMatrix
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 409 units with 5,997 lines of code in units (69.7% of code).
    • 4 very long units (545 lines of code)
    • 15 long units (1,029 lines of code)
    • 62 medium size units (1,816 lines of code)
    • 78 small units (1,180 lines of code)
    • 250 very small units (1,427 lines of code)
9% | 17% | 30% | 19% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts9% | 17% | 30% | 19% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/converter25% | 25% | 26% | 12% | 9%
src/visualComponent4% | 18% | 32% | 22% | 21%
src0% | 20% | 59% | 5% | 14%
src/settings0% | 0% | 23% | 22% | 53%
src/services0% | 0% | 17% | 31% | 51%
src/utils0% | 0% | 31% | 20% | 48%
src/hyperlink0% | 0% | 0% | 80% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private convertDataToPowerKPIFormat()
in src/visualComponent/dynamic/powerKPIComponent.ts
143 13 1
protected applyDataToCurrentSeries()
in src/converter/data/dataConverter.ts
136 20 1
protected converterStep()
in src/converter/data/rowBasedModel/rowBasedModelConverter.ts
136 20 1
protected converterStep()
in src/converter/data/columnBasedModel/columnBasedModelConverter.ts
130 20 1
public abstract deepSearchSeries()
in src/converter/data/dataConverter.ts
93 10 2
protected getSeriesByDisplayName()
in src/converter/data/dataConverter.ts
91 18 13
public convert()
in src/converter/data/dataConverter.ts
89 10 1
constructor()
in src/visualComponent/columnMapping/columnMappingComponent.ts
81 4 1
private renderCells()
in src/visualComponent/table/body/bodyRowComponent.ts
81 2 1
private renderContainer()
in src/visualComponent/table/body/bodyRowComponent.ts
77 9 6
private applyCategorySet()
in src/converter/data/dataConverter.ts
68 19 6
public render()
in src/visualComponent/table/cell/sparkline/dynamic/tooltipComponent.ts
66 8 1
private postProcess()
in src/converter/data/dataConverter.ts
60 14 6
private renderCells()
in src/visualComponent/table/body/collapsedBodyRowComponent.ts
59 7 1
public render()
in src/visualComponent/table/body/bodyRowComponent.ts
55 11 1
public render()
in src/visualComponent/table/tableComponent.ts
54 6 1
public update()
in src/visual.ts
53 15 1
public render()
in src/visualComponent/table/cell/sparkline/sparklineCellComponent.ts
51 4 1
protected applyState()
in src/visualComponent/table/row/rowComponent.ts
51 17 1
public render()
in src/visualComponent/table/cell/sparkline/lineComponent.ts
49 1 1