aws-samples / aws-ddos-fire-extinguisher
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 7 units with 199 lines of code in units (5.1% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (81 lines of code)
    • 3 medium size units (74 lines of code)
    • 2 small units (34 lines of code)
    • 1 very small units (10 lines of code)
0% | 40% | 37% | 17% | 5%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 40% | 37% | 17% | 5%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda/configure-shield0% | 77% | 22% | 0% | 0%
lambda/auto-rbr-generate0% | 0% | 53% | 35% | 10%
Alternative Visuals
Longest Units
Top 7 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in lambda/configure-shield/index.py
81 14 2
def run_queries()
in lambda/auto-rbr-generate/query_actions.py
26 8 1
def send_email()
in lambda/auto-rbr-generate/send_notiification.py
25 6 2
def send()
in lambda/configure-shield/cfnresponse.py
23 3 6
def generate_updated_cfn_parameters()
in lambda/auto-rbr-generate/cloudformation_actions.py
20 11 1
def generate_change_set()
in lambda/auto-rbr-generate/cloudformation_actions.py
14 1 1
def lambda_handler()
in lambda/auto-rbr-generate/index.py
10 4 2