aws-solutions / distributed-load-testing-on-aws
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 72 units with 2,826 lines of code in units (50.7% of code).
    • 8 very long units (1,694 lines of code)
    • 6 long units (428 lines of code)
    • 12 medium size units (384 lines of code)
    • 8 small units (104 lines of code)
    • 38 very small units (216 lines of code)
59% | 15% | 13% | 3% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts80% | 14% | 5% | 0% | <1%
js39% | 15% | 22% | 7% | 14%
py0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/infrastructure/lib80% | 14% | 5% | 0% | <1%
source/console/src42% | 12% | 24% | 7% | 12%
source/results-parser/lib0% | 81% | 0% | 0% | 18%
source/task-status-checker0% | 0% | 0% | 100% | 0%
deployment/ecr/distributed-load-testing-on-aws-load-tester0% | 0% | 0% | 0% | 100%
source/api-services/lib0% | 0% | 0% | 0% | 100%
source/custom-resource/lib0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
render()
in source/console/src/Components/Create/Create.js
432 12 0
constructor()
in source/infrastructure/lib/test-task-lambdas.ts
288 1 3
constructor()
in source/infrastructure/lib/api.ts
266 1 3
constructor()
in source/infrastructure/lib/distributed-load-testing-on-aws-stack.ts
244 1 3
constructor()
in source/infrastructure/lib/auth.ts
134 1 3
constructor()
in source/infrastructure/lib/step-functions.ts
113 1 3
showResult()
in source/console/src/Components/Results/Results.js
112 7 2
constructor()
in source/infrastructure/lib/common-resources.ts
105 1 3
constructor()
in source/console/src/Components/Create/Create.js
87 13 1
constructor()
in source/infrastructure/lib/ecs.ts
86 1 3
render()
in source/console/src/Components/Running/Running.js
72 7 0
constructor()
in source/infrastructure/lib/scenarios-storage.ts
70 1 3
function results()
in source/results-parser/lib/parser/index.js
57 13 2
constructor()
in source/infrastructure/lib/vpc.ts
56 1 3
async handleStart()
in source/console/src/Components/Details/Details.js
48 3 0
render()
in source/console/src/Components/Dashboard/Dashboard.js
48 4 0
constructor()
in source/console/src/Components/Details/Details.js
42 1 1
constructor()
in source/infrastructure/lib/custom-resources.ts
42 1 3
function registerValidSW()
in source/console/src/serviceWorker.js
33 8 2
render()
in source/console/src/Components/History/History.js
30 2 0