aws-samples / build-a-360-degree-customer-view-with-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 23 units with 340 lines of code in units (30.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (144 lines of code)
    • 9 small units (130 lines of code)
    • 9 very small units (66 lines of code)
0% | 0% | 42% | 38% | 19%
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% | 42% | 38% | 19%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda/lambda-pg-generator0% | 0% | 81% | 18% | 0%
lambda/lambda-crm-generator-consumer0% | 0% | 53% | 46% | 0%
library0% | 0% | 48% | 0% | 51%
gluejobs0% | 0% | 48% | 0% | 51%
lambda/lambda-mf-csv-generator0% | 0% | 0% | 88% | 11%
lambda/lambda-getgatables0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def getLine()
in lambda/lambda-crm-generator-consumer/crmapi.py
32 9 1
def get_secret()
in lambda/lambda-pg-generator/postgresql.py
32 8 0
def lambda_handler()
in lambda/lambda-pg-generator/postgresql.py
28 3 2
def infer()
in library/n1_c360_dispositions.py
26 3 3
def infer()
in gluejobs/n1_c360_dispositions.py
26 3 3
def lambda_handler()
in lambda/lambda-mf-csv-generator/gbank.py
18 2 2
def lambda_handler()
in lambda/lambda-mf-csv-generator/account.py
17 2 2
def lambda_handler()
in lambda/lambda-mf-csv-generator/card.py
16 2 2
def lambda_handler()
in lambda/lambda-crm-generator-consumer/crmapi.py
15 2 2
def getSQL()
in lambda/lambda-pg-generator/postgresql.py
14 1 0
def lambda_handler()
in lambda/lambda-crm-generator-consumer/getapi.py
13 2 2
def getLine()
in lambda/lambda-mf-csv-generator/card.py
13 1 0
def getLine()
in lambda/lambda-mf-csv-generator/account.py
13 1 1
def lambda_handler()
in lambda/lambda-getgatables/getgatables.py
11 2 2
def getLine()
in lambda/lambda-mf-csv-generator/gbank.py
10 1 1
def read()
in library/n1_c360_dispositions.py
8 1 1
def read()
in gluejobs/n1_c360_dispositions.py
8 1 1
def run_query()
in library/n1_c360_dispositions.py
7 1 2
def validate_query()
in library/n1_c360_dispositions.py
7 2 2
def run_query()
in gluejobs/n1_c360_dispositions.py
7 1 2