microsoft / powerbi-visuals-utils-dataviewutils
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 30 units with 286 lines of code in units (66.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (45 lines of code)
    • 8 small units (119 lines of code)
    • 20 very small units (122 lines of code)
0% | 0% | 15% | 41% | 42%
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% | 15% | 41% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 15% | 41% | 42%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function groupValues()
in src/dataViewTransform.ts
24 7 1
public static enumerateObjectInstances()
in src/dataViewObjectsParser.ts
21 5 2
public static parse()
in src/dataViewObjectsParser.ts
18 6 1
17 9 2
public getProperties()
in src/dataViewObjectsParser.ts
17 3 0
export function getCommonValue()
in src/dataViewObjects.ts
15 7 3
15 2 1
export function createValueColumns()
in src/dataViewTransform.ts
14 3 3
export function getValue()
in src/dataViewObjects.ts
12 2 3
request.onreadystatechange = function()
in src/validationHelper.ts
11 3 0
10 5 2
export function getValue()
in src/dataViewObject.ts
10 3 3
export function getFillColor()
in src/dataViewObjects.ts
10 3 3
9 5 3
export function getObject()
in src/dataViewObjects.ts
9 3 3
private static createPropertyIdentifier()
in src/dataViewObjectsParser.ts
8 1 2
7 3 3
export function hasImageUrlColumn()
in src/converterHelper.ts
6 5 1
export function hasRoleInDataView()
in src/dataRoleHelper.ts
6 5 2
6 4 2