aws-samples / aws-cloudformation-apigw-sap-idocs
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 9 units with 197 lines of code in units (41.9% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 3 medium size units (102 lines of code)
    • 2 small units (30 lines of code)
    • 3 very small units (14 lines of code)
0% | 25% | 51% | 15% | 7%
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% | 51% | 15% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda/apigw-sap-idoc-authorizer0% | 34% | 51% | 10% | 4%
lambda/apigw-sap-idoc-s30% | 0% | 53% | 29% | 17%
Alternative Visuals
Longest Units
Top 9 longest units
Unit# linesMcCabe index# params
exports.handler = function()
in lambda/apigw-sap-idoc-authorizer/index.js
51 13 3
function getToken()
in lambda/apigw-sap-idoc-authorizer/index.js
44 6 1
function getCredentials()
in lambda/apigw-sap-idoc-authorizer/index.js
33 2 1
exports.handler = function()
in lambda/apigw-sap-idoc-s3/index.js
25 6 3
function allow()
in lambda/apigw-sap-idoc-authorizer/index.js
16 2 2
function storeItem()
in lambda/apigw-sap-idoc-s3/index.js
14 2 5
function getResponse()
in lambda/apigw-sap-idoc-s3/index.js
8 1 2
async function credentials()
in lambda/apigw-sap-idoc-authorizer/index.js
3 1 1
async function token()
in lambda/apigw-sap-idoc-authorizer/index.js
3 1 1