awslabs / aws-account-migration-automation
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 68 units with 1,455 lines of code in units (47.3% of code).
    • 2 very long units (293 lines of code)
    • 5 long units (339 lines of code)
    • 13 medium size units (431 lines of code)
    • 13 small units (192 lines of code)
    • 35 very small units (200 lines of code)
20% | 23% | 29% | 13% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py20% | 23% | 29% | 13% | 13%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src23% | 20% | 32% | 11% | 12%
resources/helper_scripts0% | 95% | 0% | 0% | 4%
src/utils0% | 0% | 23% | 40% | 35%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in src/tobedeleted.py
191 44 2
def lambda_handler()
in src/reports.py
102 16 2
def restore_test_env()
in resources/helper_scripts/restore_test_accounts.py
84 27 2
def leave_org()
in src/leave_organization.py
75 4 1
def lambda_handler()
in src/cleanup.py
69 10 2
def get_org_level_resources()
in src/get_org_dependent_resources.py
57 16 5
def lambda_handler()
in src/support_case.py
54 8 2
def lambda_handler()
in src/join_organization.py
45 2 2
def create_roles()
in src/util.py
43 10 1
def lambda_handler()
in src/update_account_ou.py
39 2 2
def lambda_handler()
in src/create_roles.py
38 5 2
def lambda_handler()
in src/check_billing_access.py
36 7 2
def lambda_handler()
in src/notifier.py
34 8 2
def lambda_handler()
in src/create_master_roles.py
34 5 2
def lambda_handler()
in src/load_data.py
33 4 2
def lambda_handler()
in src/get_org_dependent_resources.py
32 6 2
def log_error()
in src/me_logger.py
26 6 8
def get_support_case_desc()
in src/constant.py
25 1 1
def process_xls()
in src/utils/data.py
24 9 1
def lambda_handler()
in src/update_tags.py
22 1 2