aws-samples / amazon-chime-sdk-recording-demo
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 12 units with 231 lines of code in units (32.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (59 lines of code)
    • 3 medium size units (98 lines of code)
    • 3 small units (39 lines of code)
    • 5 very small units (35 lines of code)
0% | 25% | 42% | 16% | 15%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 25% | 42% | 16% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 47% | 52% | 0% | 0%
ROOT0% | 0% | 38% | 29% | 32%
recording/utils0% | 0% | 0% | 68% | 31%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
59 9 3
42 4 4
34 15 0
22 2 3
14 3 3
uploadStream()
in recording/utils/upload.js
13 2 1
12 4 0
9 2 0
function usage()
in deploy.js
8 2 0
8 2 2
constructor()
in recording/utils/upload.js
6 1 2
4 1 0