cdklabs / cdk-deployer
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 13 units with 213 lines of code in units (76.6% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (74 lines of code)
    • 1 medium size units (35 lines of code)
    • 4 small units (70 lines of code)
    • 7 very small units (34 lines of code)
0% | 34% | 16% | 32% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 49% | 0% | 35% | 14%
py0% | 0% | 54% | 26% | 18%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 63% | 0% | 17% | 18%
custom-resource-runtime/ec2-deployer0% | 0% | 54% | 26% | 18%
example0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
constructor()
in src/ec2-deployer.ts
74 13 3
def handle_event()
in custom-resource-runtime/ec2-deployer/index.py
35 4 1
public bind()
in src/code.ts
20 4 1
def handle_is_complete()
in custom-resource-runtime/ec2-deployer/index.py
17 3 1
constructor()
in example/index-without-asg.ts
17 1 3
constructor()
in example/index-with-asg.ts
16 1 3
public bind()
in src/code.ts
9 1 1
def on_event()
in custom-resource-runtime/ec2-deployer/index.py
6 4 2
def is_complete()
in custom-resource-runtime/ec2-deployer/index.py
6 4 2
constructor()
in src/code.ts
4 1 3
3 1 3
3 1 2
constructor()
in src/code.ts
3 1 2