microsoft / powerbi-visuals-timeline
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 150 units with 1,806 lines of code in units (68.6% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (355 lines of code)
    • 17 medium size units (500 lines of code)
    • 34 small units (471 lines of code)
    • 94 very small units (480 lines of code)
0% | 19% | 27% | 26% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 19% | 27% | 26% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 24% | 36% | 21% | 16%
src/granularity0% | 13% | 11% | 23% | 52%
src/calendars0% | 0% | 0% | 67% | 32%
src/datePeriod0% | 0% | 0% | 46% | 53%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
public update()
in src/timeLine.ts
84 17 1
public static CONVERTER()
in src/timeLine.ts
82 14 8
private render()
in src/timeLine.ts
75 3 4
60 17 1
public render()
in src/granularity/granularityBase.ts
54 4 2
43 14 4
constructor()
in src/timeLine.ts
42 1 1
40 9 3
public renderCursors()
in src/timeLine.ts
34 1 3
public renderCells()
in src/timeLine.ts
33 1 3
33 3 2
33 4 6
31 3 6
public fillCells()
in src/timeLine.ts
26 7 1
26 12 1
25 10 4
24 5 3
public addDate()
in src/granularity/granularityBase.ts
23 4 1
public onCursorDrag()
in src/timeLine.ts
23 6 1
22 2 1