microsoft / wineryjs
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 184 units with 1,744 lines of code in units (76.7% of code).
    • 1 very long units (107 lines of code)
    • 2 long units (117 lines of code)
    • 17 medium size units (515 lines of code)
    • 26 small units (360 lines of code)
    • 138 very small units (645 lines of code)
6% | 6% | 29% | 20% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts6% | 6% | 29% | 20% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib6% | 6% | 29% | 20% | 36%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
107 18 3
65 12 0
public constructor()
in lib/application.ts
52 8 2
public create()
in lib/object-context.ts
49 12 1
private prepareExecutionStack()
in lib/request-context.ts
47 12 1
public constructor()
in lib/request-context.ts
40 3 2
private loadInternal()
in lib/request-template.ts
38 6 2
36 7 2
public needsUpdate()
in lib/object-context.ts
32 11 2
public async serve()
in lib/host.ts
30 6 1
public static tryParse()
in lib/object-provider.ts
27 5 1
public constructor()
in lib/object-context.ts
26 5 5
public constructor()
in lib/request-template.ts
26 2 4
public register()
in lib/host.ts
25 5 3
public get()
in lib/object-context.ts
25 5 1
public create()
in lib/object-type.ts
24 7 2
public serve()
in lib/host.ts
23 4 1
23 5 2
export function createFunction()
in lib/builtin-types.ts
22 5 2
public provide()
in lib/object-provider.ts
22 6 2