aws-samples / aws-augmentability
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 78 units with 923 lines of code in units (36.7% of code).
    • 1 very long units (153 lines of code)
    • 0 long units (0 lines of code)
    • 9 medium size units (243 lines of code)
    • 21 small units (307 lines of code)
    • 47 very small units (220 lines of code)
16% | 0% | 26% | 33% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js16% | 0% | 26% | 33% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lib16% | 0% | 26% | 33% | 23%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
153 16 1
37 5 0
function speakText()
in lib/main.js
32 5 0
async start()
in lib/webcam-easy.js
30 2 1
exports.createPresignedURL = function()
in lib/aws-signature-v4.js
26 13 6
25 3 2
$()
in lib/main.js
24 4 1
24 3 0
23 1 0
22 3 1
20 2 2
19 1 2
async stream()
in lib/webcam-easy.js
18 1 0
$()
in lib/main.js
18 1 1
$()
in lib/main.js
18 1 1
18 6 1
function()
in lib/main.js
17 3 1
16 2 0
15 2 1
15 1 1