aws-quickstart / quickstart-ct-trend-micro-cloud-one-conformity
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 30 units with 526 lines of code in units (54.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (77 lines of code)
    • 6 medium size units (221 lines of code)
    • 13 small units (189 lines of code)
    • 10 very small units (39 lines of code)
0% | 14% | 42% | 35% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 14% | 42% | 35% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
functions/source0% | 14% | 42% | 35% | 7%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in functions/source/c1c_controltower_lifecycle.py
77 17 2
def update_policy()
in functions/source/c1c_controltower_lifecycle.py
48 6 1
def delete_cross_account_role()
in functions/source/c1c_controltower_lifecycle.py
45 10 1
def create_cross_account_role()
in functions/source/c1c_controltower_lifecycle.py
43 5 2
def assume_role()
in functions/source/c1c_controltower_lifecycle.py
33 3 2
def get_api_key()
in functions/source/c1cresources.py
26 8 0
def configure_account()
in functions/source/c1c_controltower_lifecycle.py
26 5 1
def add_account()
in functions/source/c1cconnectorapi.py
16 1 2
def get_assume_role_policy_document()
in functions/source/c1cresources.py
16 1 1
def send()
in functions/source/cfnhelper.py
16 2 3
def fresh_deploy()
in functions/source/c1c_controltower_lifecycle.py
16 2 1
def remove_all()
in functions/source/c1c_controltower_lifecycle.py
16 2 1
def update_accounts()
in functions/source/c1c_controltower_lifecycle.py
16 2 1
def get_account_id()
in functions/source/c1cconnectorapi.py
15 4 2
def __init__()
in functions/source/cfnhelper.py
15 2 5
def create_account()
in functions/source/ctlifecycleevent.py
15 4 1
def remove_account_config()
in functions/source/c1c_controltower_lifecycle.py
13 2 1
def request()
in functions/source/c1cconnectorapi.py
12 2 4
def __init__()
in functions/source/ctlifecycleevent.py
12 1 2
def __init__()
in functions/source/c1cconnectorapi.py
11 1 2