angular / preboot
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 55 units with 669 lines of code in units (59.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (54 lines of code)
    • 9 medium size units (255 lines of code)
    • 14 small units (191 lines of code)
    • 31 very small units (169 lines of code)
0% | 8% | 38% | 28% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 8% | 38% | 27% | 25%
js0% | 0% | 0% | 100% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/lib/api0% | 14% | 28% | 42% | 15%
tools/tslint-rules0% | 0% | 52% | 7% | 39%
src/lib0% | 0% | 76% | 0% | 23%
src/lib/common0% | 0% | 43% | 0% | 56%
integration0% | 0% | 0% | 100% | 0%
tools/package-tools0% | 0% | 0% | 100% | 0%
integration/src0% | 0% | 0% | 0% | 100%
integration/src/app0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
export function createListenHandler()
in src/lib/api/event.recorder.ts
54 13 4
export function PREBOOT_FACTORY()
in src/lib/provider.ts
48 10 6
private _validatedDecorator()
in tools/tslint-rules/validateDecoratorsRule.ts
31 9 1
export function start()
in src/lib/api/event.recorder.ts
31 11 2
cleanup()
in src/lib/api/event.replayer.ts
28 10 1
export function getNodeKeyForPreboot()
in src/lib/common/get-node-key.ts
28 11 1
export function stringifyWithFunctions()
in src/lib/api/inline.preboot.code.ts
23 6 1
replayEvent()
in src/lib/api/event.replayer.ts
23 5 2
visitClassDeclaration()
in tools/tslint-rules/noHostDecoratorInConcreteRule.ts
22 5 1
private _generateRules()
in tools/tslint-rules/validateDecoratorsRule.ts
21 4 1
export function handleEvents()
in src/lib/api/event.recorder.ts
20 3 4
export function getSelection()
in src/lib/api/event.recorder.ts
18 8 1
export function assign()
in src/lib/api/inline.preboot.code.ts
17 9 2
switchBuffer()
in src/lib/api/event.replayer.ts
17 10 1
setFocus()
in src/lib/api/event.replayer.ts
16 8 1
function runWebpack()
in integration/build.js
12 2 0
export function getAppRoot()
in src/lib/api/event.recorder.ts
12 3 3
export function createBuffer()
in src/lib/api/event.recorder.ts
12 5 1
export function getEventRecorderCode()
in src/lib/api/inline.preboot.code.ts
12 3 0
export function findBuildConfig()
in tools/package-tools/find-build-config.ts
11 3 0