microsoft / PowerBI-visuals-TimelineStoryteller
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 376 units with 9,320 lines of code in units (77.9% of code).
    • 19 very long units (4,480 lines of code)
    • 18 long units (1,272 lines of code)
    • 58 medium size units (1,727 lines of code)
    • 62 small units (889 lines of code)
    • 219 very small units (952 lines of code)
48% | 13% | 18% | 9% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts49% | 12% | 18% | 9% | 9%
js0% | 46% | 26% | 4% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/core53% | 12% | 17% | 7% | 9%
src/core/lib0% | 41% | 25% | 5% | 27%
src0% | 0% | 37% | 56% | 6%
src/lib0% | 0% | 39% | 55% | 4%
src/core/dialogs0% | 0% | 33% | 36% | 30%
src/core/templates0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
787 60 3
function update()
in src/core/configurableTL.ts
656 206 12
function delayedUpdate()
in src/core/configurableTL.ts
418 120 7
function determineSize()
in src/core/main.ts
308 45 4
function processTimeline()
in src/core/main.ts
270 4 2
export default function()
in src/core/addImage.ts
211 6 7
192 23 0
function radialAxis()
in src/core/radialAxis.ts
168 7 1
function configureLinearAxis()
in src/core/configurableTL.ts
164 32 12
setTimeout()
in src/core/main.ts
163 16 1
function calendarAxis()
in src/core/calendarAxis.ts
154 1 1
function drawTimeline()
in src/core/main.ts
145 13 1
function configureTimelineScaleSegments()
in src/core/configurableTL.ts
143 42 11
function changeScene()
in src/core/main.ts
141 25 1
function updateScale()
in src/core/configurableTL.ts
126 37 2
function configurableTL()
in src/core/configurableTL.ts
112 12 1
function reset()
in src/core/globals.ts
110 1 0
function initializeElements()
in src/core/configurableTL.ts
109 14 8
103 17 2
function configureFacets()
in src/core/configurableTL.ts
97 13 8