aws-samples / amazon-eks-using-cdk-typescript
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 18 units with 809 lines of code in units (36.1% of code).
    • 3 very long units (533 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (175 lines of code)
    • 4 small units (65 lines of code)
    • 6 very small units (36 lines of code)
65% | 0% | 21% | 8% | 4%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts74% | 0% | 15% | 6% | 2%
py0% | 0% | 64% | 18% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/policies76% | 0% | 23% | 0% | 0%
lib71% | 0% | 0% | 20% | 8%
lib/custom-resources0% | 0% | 64% | 18% | 16%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
export function createAlbIngressPolicy()
in lib/policies/policies.ts
235 1 3
constructor()
in lib/eks-cdk-js-stack.ts
166 1 3
export function createEBSPolicy()
in lib/policies/policies.ts
132 1 3
export function createEFSPolicy()
in lib/policies/policies.ts
47 1 3
43 1 3
def on_create()
in lib/custom-resources/eksloggingOnEvent.py
35 7 1
def is_complete()
in lib/custom-resources/eksloggingOnEvent.py
28 6 2
export function createFluentbitPolicy()
in lib/policies/policies.ts
22 1 3
20 1 2
def log_config_diff()
in lib/custom-resources/eksloggingOnEvent.py
18 3 2
public createNodegroupRole()
in lib/eks-cdk-js-stack.ts
15 1 1
private getOrCreateVpc()
in lib/eks-cdk-js-stack.ts
12 3 1
addConditions()
in lib/k8s-baseline.ts
9 3 2
private getOrCreateEksName()
in lib/eks-cdk-js-stack.ts
7 2 1
def on_event()
in lib/custom-resources/eksloggingOnEvent.py
7 4 2
def on_update()
in lib/custom-resources/eksloggingOnEvent.py
5 1 1
def on_delete()
in lib/custom-resources/eksloggingOnEvent.py
4 1 1
cleanManifest()
in lib/k8s-baseline.ts
4 2 1