microsoft / Powerbi-Visuals-SampleMatrix
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 23 units with 296 lines of code in units (64.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (89 lines of code)
    • 9 small units (144 lines of code)
    • 10 very small units (63 lines of code)
0% | 0% | 30% | 48% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 30% | 48% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 30% | 48% | 21%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public update()
in src/visual.ts
24 14 1
private static formatRowNodes()
in src/matrixDataviewHtmlFormatter.ts
23 10 1
public pushInstance()
in src/objectEnumerationBuilder.ts
21 6 2
21 6 4
public static merge()
in src/objectEnumerationBuilder.ts
20 9 2
20 5 2
private static countColumnNodeLeaves()
in src/matrixDataviewHtmlFormatter.ts
19 7 2
19 6 1
private static formatColumnNodes()
in src/matrixDataviewHtmlFormatter.ts
16 4 2
private extend()
in src/objectEnumerationBuilder.ts
14 5 3
public static selectorEquals()
in src/objectEnumerationBuilder.ts
13 7 2
public complete()
in src/objectEnumerationBuilder.ts
12 3 0
11 4 2
10 2 3
public pushContainer()
in src/objectEnumerationBuilder.ts
9 2 1
public static formatDataViewMatrix()
in src/matrixDataviewHtmlFormatter.ts
8 1 1
7 2 2
7 3 3
public static normalize()
in src/objectEnumerationBuilder.ts
6 2 1
private canMerge()
in src/objectEnumerationBuilder.ts
5 3 2