aws-samples / alexa-skill-with-sap-data-and-scp
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 26 units with 379 lines of code in units (76.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (79 lines of code)
    • 6 medium size units (188 lines of code)
    • 2 small units (27 lines of code)
    • 17 very small units (85 lines of code)
0% | 20% | 49% | 7% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
js0% | 20% | 49% | 7% | 22%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
scp-odata-proxy-api/odataproxyapi0% | 54% | 38% | 0% | 7%
alexa/lambda/lib/functions/aws-sap-alexa-scp-solo0% | 0% | 50% | 13% | 36%
alexa/lambda/lib0% | 0% | 100% | 0% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
async function proxyToBackend()
in scp-odata-proxy-api/odataproxyapi/start.js
79 11 3
async handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
41 1 1
function getDataFromSAP()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
32 6 6
function getToken()
in scp-odata-proxy-api/odataproxyapi/start.js
31 4 3
constructor()
in alexa/lambda/lib/lambda-stack.js
30 1 3
async handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
29 2 1
function getDestinationDetails()
in scp-odata-proxy-api/odataproxyapi/start.js
25 4 2
async handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
14 1 1
function getCsrfToken()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
13 1 1
function filterAllowedHeaders()
in scp-odata-proxy-api/odataproxyapi/start.js
8 3 2
handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
8 1 2
handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
7 1 1
handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
7 1 1
handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
7 1 1
handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
6 1 1
handle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
6 1 1
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
5 3 1
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
4 2 1
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
4 2 1
canHandle()
in alexa/lambda/lib/functions/aws-sap-alexa-scp-solo/index.js
4 2 1