aws-samples / aws-cdk-eks-fluxv2-example
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 8 units with 233 lines of code in units (68.1% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (130 lines of code)
    • 2 medium size units (73 lines of code)
    • 1 small units (11 lines of code)
    • 3 very small units (19 lines of code)
0% | 55% | 31% | 4% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 55% | 31% | 4% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
infra/lib/addons0% | 39% | 42% | 6% | 11%
infra/lib0% | 100% | 0% | 0% | 0%
Alternative Visuals
Longest Units
Top 8 longest units
Unit# linesMcCabe index# params
constructor()
in infra/lib/addons/cluster-autoscaler.ts
68 1 3
constructor()
in infra/lib/infra-stack.ts
62 1 3
constructor()
in infra/lib/addons/fluxv2.ts
43 1 3
constructor()
in infra/lib/addons/aws-lbc.ts
30 1 3
private getLatestReleaseVersion()
in infra/lib/addons/fluxv2.ts
11 1 0
constructor()
in infra/lib/addons/fluxv2.ts
8 2 1
public getManifest()
in infra/lib/addons/fluxv2.ts
8 1 0
public getUrl()
in infra/lib/addons/fluxv2.ts
3 1 0