microsoft / ReSub
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 50 units with 579 lines of code in units (55.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (67 lines of code)
    • 7 medium size units (231 lines of code)
    • 10 small units (143 lines of code)
    • 32 very small units (138 lines of code)
0% | 11% | 39% | 24% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 11% | 39% | 24% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 14% | 29% | 28% | 27%
src/tslint0% | 0% | 83% | 9% | 7%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function makeAutoSubscribeDecorator()
in src/AutoSubscriptions.ts
67 14 2
protected trigger()
in src/StoreBase.ts
47 21 1
function walk()
in src/tslint/incorrectStateAccessRule.ts
40 8 1
export function disableWarnings()
in src/AutoSubscriptions.ts
34 5 3
32 14 0
private _checkOverrideCallsSuper()
in src/tslint/overrideCallsSuperRule.ts
30 8 2
function analyzeMethodBody()
in src/tslint/incorrectStateAccessRule.ts
25 7 1
constructor()
in src/ComponentBase.ts
23 5 1
19 5 3
function createAutoSubscribeWrapper()
in src/AutoSubscriptions.ts
18 2 4
17 5 3
private _handleAutoSubscribe()
in src/ComponentBase.ts
15 2 2
14 6 3
14 4 4
private static _getPerformanceImpl()
in src/Instrumentation.ts
12 8 0
12 6 3
handle()
in src/AutoSubscriptions.ts
11 1 3
private _hasSuperCallForSameMethodName()
in src/tslint/overrideCallsSuperRule.ts
11 3 2
private _handleUpdate()
in src/ComponentBase.ts
9 4 2
export function enableAutoSubscribe()
in src/AutoSubscriptions.ts
8 1 1