aws-samples / aws-control-tower-automate-account-creation
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 36 units with 563 lines of code in units (66.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (214 lines of code)
    • 20 small units (288 lines of code)
    • 8 very small units (61 lines of code)
0% | 0% | 38% | 51% | 10%
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% | 38% | 51% | 10%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source0% | 0% | 38% | 51% | 10%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in functions/source/account_create.py
46 10 2
def validateinput()
in functions/source/new_account_handler.py
30 11 1
def provision_new_account()
in functions/source/account_create.py
27 3 0
def validate_update_dyno()
in functions/source/new_account_handler.py
23 3 2
def send()
in functions/source/cfnresource.py
23 3 6
def account_handler()
in functions/source/new_account_handler.py
22 6 2
def get_product_id()
in functions/source/account_create.py
22 6 0
def get_portfolio_id()
in functions/source/account_create.py
21 6 1
def update_account_status()
in functions/source/account_create.py
20 3 4
def get_ou_map()
in functions/source/new_account_handler.py
18 2 0
def read_file()
in functions/source/new_account_handler.py
17 4 3
def process_lifecycle_event()
in functions/source/account_create.py
17 2 1
def list_of_ous()
in functions/source/new_account_handler.py
16 4 0
def associate_principal_portfolio()
in functions/source/account_create.py
16 1 2
def get_provisioning_artifact_id()
in functions/source/account_create.py
16 3 1
def list_of_accounts()
in functions/source/new_account_handler.py
15 4 0
def sc_initial_failure()
in functions/source/account_create.py
15 2 2
def list_children()
in functions/source/new_account_handler.py
14 3 2
def list_principals_in_portfolio()
in functions/source/account_create.py
14 4 1
def disassociate_principal_portfolio()
in functions/source/account_create.py
14 1 2