aws-samples / aws-aurora-serverless-data-api-sam
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 28 units with 330 lines of code in units (54.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (158 lines of code)
    • 6 small units (94 lines of code)
    • 16 very small units (78 lines of code)
0% | 0% | 47% | 28% | 23%
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% | 47% | 28% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambdas/helper0% | 0% | 58% | 29% | 12%
lambdas0% | 0% | 0% | 28% | 71%
deploy_scripts/ddl_scripts0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def batch_execute_statement()
in lambdas/helper/dal.py
34 6 5
def save_ec2()
in lambdas/helper/dal.py
27 5 4
def find_package()
in lambdas/helper/dal.py
26 4 3
def find_ec2()
in lambdas/helper/dal.py
26 6 2
def execute_statement()
in lambdas/helper/dal.py
24 4 4
def _find_ec2_package_relations()
in lambdas/helper/dal.py
21 2 2
19 3 5
def _save_packages_batch()
in lambdas/helper/dal.py
18 3 4
def _save_package()
in lambdas/helper/dal.py
15 2 4
def _save_ec2_package_relation()
in lambdas/helper/dal.py
15 1 4
def handle_error()
in lambdas/helper/lambdautils.py
14 3 1
def handler()
in lambdas/get_ec2_info.py
13 2 2
def handler()
in lambdas/add_ec2_info.py
10 2 2
def execute_statement()
in deploy_scripts/ddl_scripts/create_schema.py
9 1 1
def validate_input()
in lambdas/add_ec2_info.py
7 2 1
def error()
in lambdas/helper/lambdautils.py
7 1 2
def validate_path_parameters()
in lambdas/get_ec2_info.py
6 3 1
def validate_ec2_path_parameters()
in lambdas/add_ec2_info.py
6 3 1
def __init__()
in lambdas/helper/dal.py
5 1 4
def validate_ec2_input_parameters()
in lambdas/add_ec2_info.py
4 3 1