aws-samples / enginframe-aurora-serverless
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 10 units with 659 lines of code in units (82.3% of code).
    • 1 very long units (346 lines of code)
    • 1 long units (80 lines of code)
    • 7 medium size units (219 lines of code)
    • 1 small units (14 lines of code)
    • 0 very small units (0 lines of code)
52% | 12% | 33% | 2% | 0%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py52% | 12% | 33% | 2% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
enginframe_aurora_serverless62% | 14% | 22% | 0% | 0%
lambda_cert0% | 0% | 100% | 0% | 0%
lambda_destroy_pcluster0% | 0% | 61% | 38% | 0%
Alternative Visuals
Longest Units
Top 10 longest units
Unit# linesMcCabe index# params
def __init__()
in enginframe_aurora_serverless/enginframe.py
346 4 13
def __init__()
in enginframe_aurora_serverless/aurora_serverless.py
80 1 5
def lambda_handler()
in lambda_cert/cert.py
49 10 2
def __init__()
in enginframe_aurora_serverless/alb.py
49 1 5
def __init__()
in enginframe_aurora_serverless/fsx.py
31 1 6
def __init__()
in enginframe_aurora_serverless/efs.py
25 1 5
def send_response()
in lambda_destroy_pcluster/destroy.py
22 1 4
def send_response()
in lambda_cert/cert.py
22 1 4
def __init__()
in enginframe_aurora_serverless/vpc.py
21 1 4
def lambda_handler()
in lambda_destroy_pcluster/destroy.py
14 4 2