microsoft / powerbi-visuals-utils-testutils
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 174 units with 1,487 lines of code in units (67.1% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (206 lines of code)
    • 13 medium size units (401 lines of code)
    • 20 small units (304 lines of code)
    • 138 very small units (576 lines of code)
0% | 13% | 26% | 20% | 38%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 13% | 26% | 20% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/dataViewBuilder0% | 23% | 42% | 17% | 17%
src/helpers0% | 0% | 9% | 32% | 58%
src/mocks0% | 0% | 0% | 17% | 82%
src0% | 0% | 0% | 20% | 79%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private readData()
in src/dataViewBuilder/matrixBuilder.ts
89 8 4
protected createCategoricalDataViewBuilder()
in src/dataViewBuilder/testDataViewBuilder.ts
59 12 1
public build()
in src/dataViewBuilder/dataViewBuilder.ts
58 10 0
private ensureValueInHierarchy()
in src/dataViewBuilder/matrixBuilder.ts
43 8 4
private findValueInHierarchy()
in src/dataViewBuilder/matrixBuilder.ts
39 6 2
public buildMatrix()
in src/dataViewBuilder/matrixBuilder.ts
38 6 0
public createRootMatrixNode()
in src/dataViewBuilder/matrixBuilder.ts
36 10 4
private fillData()
in src/dataViewBuilder/dataViewBuilder.ts
35 9 1
static setUpDataView()
in src/dataViewBuilder/testDataViewBuilder.ts
31 7 2
static createDataViewBuilderColumnOptions()
in src/dataViewBuilder/testDataViewBuilder.ts
28 12 1
public withCategory()
in src/dataViewBuilder/dataViewBuilder.ts
27 5 1
function applySeriesData()
in src/dataViewBuilder/dataViewBuilder.ts
26 7 3
static setUpDataViewBuilderColumnOptions()
in src/dataViewBuilder/testDataViewBuilder.ts
26 11 2
export function createMouseEvent()
in src/helpers/helpers.ts
26 2 5
function groupValues()
in src/dataViewBuilder/dataViewBuilder.ts
23 7 1
public build()
in src/dataViewBuilder/matrixBuilder.ts
23 3 0
static getDataViewBuilderColumnIdentitySources()
in src/dataViewBuilder/testDataViewBuilder.ts
20 4 1
20 1 2
export function createTouch()
in src/helpers/helpers.ts
20 2 4
private sequenceEqual()
in src/dataViewBuilder/matrixBuilder.ts
19 8 4