aws-samples / cdk-bootstrapless-synthesizer
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 564 lines of code in units (78.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 9 medium size units (248 lines of code)
    • 8 small units (120 lines of code)
    • 38 very small units (196 lines of code)
0% | 0% | 43% | 21% | 34%
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% | 42% | 21% | 36%
py0% | 0% | 57% | 20% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 48% | 13% | 37%
scripts0% | 0% | 57% | 20% | 21%
sample/src0% | 0% | 0% | 72% | 27%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
42 6 2
def renderf()
in scripts/extractdoc.py
37 10 2
31 4 1
25 2 2
constructor()
in src/index.ts
25 1 1
region: resolvedOr()
in src/index.ts
23 5 2
public visit()
in src/aspect.ts
22 9 1
22 3 3
public bind()
in src/index.ts
21 3 1
19 5 2
public bind()
in sample/src/main.ts
18 3 1
constructor()
in sample/src/main.ts
15 1 3
constructor()
in sample/src/main.ts
15 1 3
14 1 1
public visit()
in src/aspect.ts
13 4 1
bucketName: cfnify()
in src/index.ts
13 2 1
def main()
in scripts/extractdoc.py
13 3 0
public synthesize()
in src/index.ts
10 1 1
10 1 1
public dumps()
in src/index.ts
8 1 0