microsoft / arcade-machine
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 80 units with 1,023 lines of code in units (72.5% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (136 lines of code)
    • 12 medium size units (377 lines of code)
    • 19 small units (287 lines of code)
    • 47 very small units (223 lines of code)
0% | 13% | 36% | 28% | 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% | 13% | 37% | 28% | 21%
js0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 15% | 35% | 27% | 21%
src/focus-strategies0% | 0% | 48% | 32% | 19%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private rescroll()
in src/focus.service.ts
75 17 3
private findNextFocusByRaycast()
in src/focus.service.ts
61 16 3
function isForForm()
in src/input.service.ts
49 24 2
constructor()
in src/input.service.ts
43 8 1
public find()
in src/focus-strategies/focus-by-distance.ts
39 12 0
private pollGamepad()
in src/input.service.ts
32 9 1
private triggerOnFocusHandlers()
in src/focus.service.ts
30 12 1
private watchForGamepad()
in src/input.service.ts
30 6 0
public findNextFocus()
in src/focus-strategies/focus-by-registry.ts
29 10 2
public attempt()
in src/input.service.ts
28 7 1
private isFocusable()
in src/focus.service.ts
27 14 1
private bubbleEvent()
in src/focus.service.ts
25 10 3
private findNextFocusable()
in src/focus.service.ts
23 7 4
public createArcEvent()
in src/focus.service.ts
22 5 1
public selectNodeWithoutEvent()
in src/focus.service.ts
20 5 2
private getFocusableElement()
in src/focus.service.ts
19 5 4
public calcPrimaryDistance()
in src/focus-strategies/focus-by-distance.ts
18 5 2
public releaseFocus()
in src/focus.service.ts
18 5 2
public bootstrap()
in src/input.service.ts
17 3 1
private getElementsInDirection()
in src/focus-strategies/focus-by-distance.ts
16 5 0