aws-quickstart / quickstart-ammos-smallsat-toolkit
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 200 lines of code in units (5.3% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (142 lines of code)
    • 2 small units (22 lines of code)
    • 5 very small units (36 lines of code)
0% | 0% | 71% | 11% | 18%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 100% | 0% | 0%
js0% | 0% | 30% | 26% | 42%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source/RoleChecker0% | 0% | 100% | 0% | 0%
functions/source/CognitoClientInspect0% | 0% | 100% | 0% | 0%
functions/source/LoggingProcessorLambda0% | 0% | 30% | 26% | 42%
Alternative Visuals
Longest Units
Top 12 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in functions/source/RoleChecker/role_checker.py
40 10 2
def lambda_handler()
in functions/source/CognitoClientInspect/cfn_cognito_inspect.py
26 4 2
function buildSource()
in functions/source/LoggingProcessorLambda/index.js
26 8 2
def send()
in functions/source/RoleChecker/cfnresponse.py
25 4 7
def send()
in functions/source/CognitoClientInspect/cfnresponse.py
25 4 7
function transform()
in functions/source/LoggingProcessorLambda/index.js
11 1 4
async function putRecords()
in functions/source/LoggingProcessorLambda/index.js
11 2 2
function createRecordsFromEvents()
in functions/source/LoggingProcessorLambda/index.js
10 1 4
function isValidJson()
in functions/source/LoggingProcessorLambda/index.js
9 2 1
function extractJson()
in functions/source/LoggingProcessorLambda/index.js
7 3 1
function chunkArrayInGroups()
in functions/source/LoggingProcessorLambda/index.js
7 2 2
function isNumeric()
in functions/source/LoggingProcessorLambda/index.js
3 2 1