aws-samples / aws-control-tower-securityhub-enabler
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 11 units with 533 lines of code in units (95.0% of code).
    • 2 very long units (321 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (166 lines of code)
    • 3 small units (46 lines of code)
    • 0 very small units (0 lines of code)
60% | 0% | 31% | 8% | 0%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py60% | 0% | 31% | 8% | 0%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src60% | 0% | 31% | 8% | 0%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in src/securityhub_enabler.py
184 12 2
def process_security_standards()
in src/securityhub_enabler.py
137 22 4
def disable_admin()
in src/securityhub_enabler.py
39 6 4
def send()
in src/securityhub_enabler.py
30 3 6
def get_account_list()
in src/securityhub_enabler.py
26 9 0
def enable_admin()
in src/securityhub_enabler.py
25 3 3
def assume_role()
in src/securityhub_enabler.py
24 2 2
def get_admin_members()
in src/securityhub_enabler.py
22 5 2
def get_enabled_regions()
in src/securityhub_enabler.py
19 4 2
def is_ct_account()
in src/securityhub_enabler.py
14 7 2
def get_ct_regions()
in src/securityhub_enabler.py
13 3 1