aws-samples / aws-security-hub-cross-account-controls-disabler
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 219 lines of code in units (31.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (62 lines of code)
    • 2 medium size units (77 lines of code)
    • 5 small units (66 lines of code)
    • 3 very small units (14 lines of code)
0% | 28% | 35% | 30% | 6%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 28% | 35% | 30% | 6%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
UpdateMembers/src/UpdateMember0% | 43% | 26% | 26% | 2%
UpdateMembers/src/GetMembers0% | 0% | 58% | 41% | 0%
UpdateMembers/src/CheckResult0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in UpdateMembers/src/UpdateMember/index.py
62 7 2
def convert_exceptions()
in UpdateMembers/src/GetMembers/index.py
40 8 1
def get_exceptions()
in UpdateMembers/src/UpdateMember/index.py
37 13 1
def lambda_handler()
in UpdateMembers/src/GetMembers/index.py
15 4 2
def get_enabled_standard_subscriptions()
in UpdateMembers/src/UpdateMember/index.py
15 3 3
def get_members()
in UpdateMembers/src/GetMembers/index.py
13 4 1
def update_control_status()
in UpdateMembers/src/UpdateMember/index.py
12 3 4
def get_controls()
in UpdateMembers/src/UpdateMember/index.py
11 2 2
def lambda_handler()
in UpdateMembers/src/CheckResult/index.py
10 4 2
def update_member()
in UpdateMembers/src/UpdateMember/index.py
2 1 0
def update_standard_subscription()
in UpdateMembers/src/UpdateMember/index.py
2 1 0