aws / constructs
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 37 units with 235 lines of code in units (80.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 0 medium size units (0 lines of code)
    • 5 small units (70 lines of code)
    • 32 very small units (165 lines of code)
0% | 0% | 0% | 29% | 70%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 0% | 0% | 29% | 70%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 0% | 26% | 73%
src/private0% | 0% | 0% | 62% | 37%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
private addChild()
in src/construct.ts
20 9 2
export function captureStackTrace()
in src/private/stack-trace.ts
15 3 1
public validate()
in src/construct.ts
13 4 0
public get defaultChild()
in src/construct.ts
11 6 0
function visit()
in src/construct.ts
11 4 1
public constructor()
in src/construct.ts
9 3 3
public get scopes()
in src/construct.ts
9 2 0
public get locked()
in src/construct.ts
9 4 0
public get dependencies()
in src/construct.ts
9 3 0
export function addressOf()
in src/private/uniqueid.ts
9 3 1
public addMetadata()
in src/construct.ts
8 3 3
public findChild()
in src/construct.ts
7 2 1
public setContext()
in src/construct.ts
7 2 2
get dependencyRoots()
in src/dependency.ts
7 2 0
public static of()
in src/dependency.ts
7 2 1
public get addr()
in src/construct.ts
6 2 0
constructor()
in src/construct.ts
6 1 2
constructor()
in src/dependency.ts
6 1 1
public findAll()
in src/construct.ts
5 1 1
public tryGetContext()
in src/construct.ts
5 3 1