aws-solutions / live-stream-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 6 units with 123 lines of code in units (8.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (108 lines of code)
    • 1 small units (11 lines of code)
    • 1 very small units (4 lines of code)
0% | 0% | 87% | 8% | 3%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 0% | 87% | 8% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/console/src0% | 0% | 90% | 9% | 0%
source/custom-resource/lib/metrics0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 6 longest units
Unit# linesMcCabe index# params
function registerValidSW()
in source/console/src/serviceWorker.js
33 8 2
render()
in source/console/src/App.js
28 2 0
function checkValidServiceWorker()
in source/console/src/serviceWorker.js
25 4 2
export function register()
in source/console/src/serviceWorker.js
22 5 1
export function unregister()
in source/console/src/serviceWorker.js
11 2 0
TimeStamp: moment()
in source/custom-resource/lib/metrics/index.js
4 1 0