aws-samples / ab-testing-at-edge
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 48 units with 778 lines of code in units (29.1% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (232 lines of code)
    • 4 medium size units (134 lines of code)
    • 23 small units (307 lines of code)
    • 17 very small units (105 lines of code)
0% | 29% | 17% | 39% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
ts0% | 34% | 20% | 37% | 7%
js0% | 0% | 0% | 50% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib/module_3_10% | 100% | 0% | 0% | 0%
lib0% | 17% | 0% | 70% | 11%
lib/module_3_30% | 100% | 0% | 0% | 0%
lib/module_3_20% | 100% | 0% | 0% | 0%
lib/module_20% | 0% | 81% | 18% | 0%
lib/module_10% | 0% | 79% | 0% | 20%
lib/bootstrap0% | 0% | 100% | 0% | 0%
resources/module_3_10% | 0% | 0% | 56% | 44%
resources/module_3_20% | 0% | 0% | 43% | 56%
resources/module_3_30% | 0% | 0% | 48% | 52%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
constructor()
in lib/module_3_1/ab_testing_module_3_1.ts
59 1 3
58 1 1
constructor()
in lib/module_3_3/ab_testing_module_3_3.ts
58 1 3
constructor()
in lib/module_3_2/ab_testing_module_3_2.ts
57 1 3
constructor()
in lib/module_2/ab_testing_module_2.ts
48 1 3
constructor()
in lib/module_1/ab_testing_module_1.ts
39 1 3
constructor()
in lib/bootstrap/ab_testing_bootstrap.ts
25 1 3
function handler()
in lib/module_2/ab_testing_module_2.ts
22 4 1
public createLEDashboard()
in lib/ab_dashboard.ts
17 1 3
async function getConfigFromCF()
in resources/module_3_2/request/index.js
17 1 1
private createLEVersionsWidget()
in lib/ab_dashboard.ts
16 1 3
private createLEUsersWidget()
in lib/ab_dashboard.ts
16 1 3
function handler()
in lib/module_2/ab_testing_module_2.ts
16 2 1
private createCFFVersionsWidget()
in lib/ab_dashboard.ts
15 1 2
private createCFFUsersWidget()
in lib/ab_dashboard.ts
15 1 2
public create2CFFDashboard()
in lib/ab_dashboard.ts
15 1 3
async function fetchConfigFromSSM()
in resources/module_3_1/request/index.js
15 3 0
public create1CFFDashboard()
in lib/ab_dashboard.ts
14 1 2
async function getConfigFromS3()
in resources/module_3_1/request/index.js
13 2 0
12 1 2