aws-samples / aws-serverless-webapp-workshop
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 41 units with 322 lines of code in units (4.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (22 lines of code)
    • 10 small units (136 lines of code)
    • 30 very small units (164 lines of code)
0% | 0% | 6% | 42% | 50%
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% | 6% | 42% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
resources/code/WildRydesVue/public0% | 0% | 11% | 28% | 60%
workshop/content/StaticWebHosting0% | 0% | 0% | 58% | 41%
workshop/content/ServerlessBackend/Lambda0% | 0% | 0% | 70% | 29%
resources/code/WildRydesVue/src0% | 0% | 0% | 78% | 21%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
function handleRegister()
in resources/code/WildRydesVue/public/js/cognito-auth.js
22 3 1
function requestUnicorn()
in workshop/content/StaticWebHosting/ride.js
17 1 1
function requestUnicorn()
in resources/code/WildRydesVue/public/js/ride.js
17 1 1
function animateArrival()
in workshop/content/StaticWebHosting/ride.js
15 3 1
function animateArrival()
in resources/code/WildRydesVue/public/js/ride.js
15 3 1
$()
in workshop/content/StaticWebHosting/ride.js
13 3 1
$()
in resources/code/WildRydesVue/public/js/ride.js
13 3 1
function recordRide()
in workshop/content/ServerlessBackend/Lambda/requestUnicorn.js
12 1 3
function errorResponse()
in workshop/content/ServerlessBackend/Lambda/requestUnicorn.js
12 1 3
function getUser()
in resources/code/WildRydesVue/src/router.js
11 3 0
function signin()
in resources/code/WildRydesVue/public/js/cognito-auth.js
11 1 4
function updateExtent()
in resources/code/WildRydesVue/public/js/esri-map.js
10 1 1
function register()
in resources/code/WildRydesVue/public/js/cognito-auth.js
9 1 4
function completeRequest()
in workshop/content/StaticWebHosting/ride.js
8 2 1
function completeRequest()
in resources/code/WildRydesVue/public/js/ride.js
8 2 1
function signUpCallback()
in resources/code/WildRydesVue/public/js/cognito-auth.js
7 2 2
createCognitoUser()
in resources/code/WildRydesVue/public/js/cognito-auth.js
7 2 1
function handleSignin()
in resources/code/WildRydesVue/public/js/cognito-auth.js
7 1 1
function handleVerify()
in resources/code/WildRydesVue/public/js/cognito-auth.js
7 1 1
function toUrlString()
in workshop/content/ServerlessBackend/Lambda/requestUnicorn.js
6 1 1