aws-samples / ssp-eks-patterns
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 379 lines of code in units (78.5% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (114 lines of code)
    • 5 medium size units (147 lines of code)
    • 5 small units (80 lines of code)
    • 6 very small units (38 lines of code)
0% | 30% | 38% | 21% | 10%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 30% | 38% | 21% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/nginx-ingress-construct0% | 100% | 0% | 0% | 0%
lib/multi-region-construct0% | 100% | 0% | 0% | 0%
lib/pipeline-stack0% | 0% | 100% | 0% | 0%
lib/multi-team-construct0% | 0% | 100% | 0% | 0%
lib/bottlerocket-construct0% | 0% | 100% | 0% | 0%
lib/fargate-construct0% | 0% | 100% | 0% | 0%
lib/custom-cluster-construct0% | 0% | 100% | 0% | 0%
lib/teams0% | 0% | 0% | 53% | 46%
lib/scratchpad0% | 0% | 0% | 100% | 0%
lib/starter-construct0% | 0% | 0% | 100% | 0%
lib/keptn-construct0% | 0% | 0% | 100% | 0%
lib/kubecost-construct0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
constructor()
in lib/nginx-ingress-construct/index.ts
57 1 2
async buildAsync()
in lib/multi-region-construct/index.ts
57 2 2
async buildAsync()
in lib/pipeline-stack/index.ts
50 4 3
constructor()
in lib/multi-team-construct/index.ts
28 1 2
constructor()
in lib/bottlerocket-construct/index.ts
24 1 2
constructor()
in lib/fargate-construct/index.ts
23 1 2
constructor()
in lib/custom-cluster-construct/index.ts
22 1 2
constructor()
in lib/scratchpad/index.ts
20 1 2
setup()
in lib/teams/team-troi/index.ts
18 1 1
setupNamespacePolicies()
in lib/teams/team-troi/index.ts
16 1 1
constructor()
in lib/starter-construct/index.ts
14 1 2
constructor()
in lib/keptn-construct/index.ts
12 1 2
constructor()
in lib/kubecost-construct/index.ts
9 1 2
setup()
in lib/teams/team-riker/index.ts
7 1 1
function getUserArns()
in lib/teams/team-burnham/index.ts
7 2 2
constructor()
in lib/teams/team-platform/index.ts
6 1 1
constructor()
in lib/teams/team-burnham/index.ts
5 1 1
users: getUserArns()
in lib/teams/team-burnham/index.ts
4 1 2