aws-samples / aws-ct-vpc-flowlogs
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 24 units with 510 lines of code in units (40.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 11 medium size units (300 lines of code)
    • 11 small units (192 lines of code)
    • 2 very small units (18 lines of code)
0% | 0% | 58% | 37% | 3%
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% | 58% | 37% | 3%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
code0% | 0% | 58% | 37% | 3%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def toggle_flowlog()
in code/ct_flowlog_activator.py
43 13 7
def delete_flowlog()
in code/ct_flowlog_activator.py
29 5 4
def get_vpc_by_region()
in code/ct_flowlog_activator.py
29 4 3
def parse_flowlog_tag()
in code/ct_flowlog_activator.py
27 9 2
def assume_role()
in code/ct_flowlog_activator.py
27 2 3
def get_subnet_by_region()
in code/ct_flowlog_activator.py
27 4 3
def sendCfnResponse()
in code/ct_flowlog_activator.py
26 4 7
def lambda_handler()
in code/ct_flowlog_lifecycle.py
25 12 2
def get_flow_log_status()
in code/ct_flowlog_activator.py
23 4 4
def get_accounts_by_ou()
in code/ct_flowlog_lifecycle.py
23 6 2
def child_handler()
in code/ct_flowlog_activator.py
21 6 2
def list_stack_instance_by_account()
in code/ct_flowlog_lifecycle.py
20 4 3
def list_stack_instance_region()
in code/ct_flowlog_lifecycle.py
20 4 2
def create_flowlog()
in code/ct_flowlog_activator.py
19 4 7
def list_stack_instance_by_region()
in code/ct_flowlog_activator.py
19 4 3
def flow_log_handler()
in code/ct_flowlog_activator.py
18 3 8
def lambda_handler()
in code/ct_flowlog_activator.py
18 12 2
def primary_handler()
in code/ct_flowlog_activator.py
18 5 1
def create_stack_instance()
in code/ct_flowlog_lifecycle.py
18 2 4
def eventbridge_handler()
in code/ct_flowlog_activator.py
15 5 2