aws-samples / amazon-guardduty-waf-acl
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 25 units with 496 lines of code in units (88.4% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (82 lines of code)
    • 7 medium size units (194 lines of code)
    • 10 small units (164 lines of code)
    • 7 very small units (56 lines of code)
0% | 16% | 39% | 33% | 11%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 16% | 39% | 33% | 11%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
lambda0% | 19% | 38% | 27% | 13%
scripts0% | 0% | 40% | 60% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def update_nacl()
in lambda/guardduty_to_acl_lambda.py
82 17 3
def lambda_handler()
in lambda/guardduty_to_acl_lambda.py
43 11 2
def check_nacl()
in scripts/gd2acl-sync-check.py
32 7 2
def lambda_handler()
in lambda/prune_old_entries.py
31 5 2
def waf_update_ip_set()
in lambda/prune_old_entries.py
24 3 4
def waf_update_ip_set()
in lambda/guardduty_to_acl_lambda.py
22 3 4
def create_netacl_rule()
in lambda/guardduty_to_acl_lambda.py
21 2 3
def admin_notify()
in lambda/guardduty_to_acl_lambda.py
21 3 6
def get_netacl_id()
in lambda/guardduty_to_acl_lambda.py
20 4 1
def create_ddb_rule()
in lambda/guardduty_to_acl_lambda.py
20 2 4
def get_netacl_id()
in scripts/gd2acl-sync-check.py
20 4 1
def delete_netacl_rule()
in lambda/prune_old_entries.py
17 3 2
def delete_ddb_rule()
in lambda/prune_old_entries.py
17 2 2
def delete_ddb_rule()
in lambda/guardduty_to_acl_lambda.py
16 2 2
def get_nacl_meta()
in scripts/gd2acl-sync-check.py
16 2 1
def delete_netacl_rule()
in lambda/guardduty_to_acl_lambda.py
14 2 2
def get_nacl_rules()
in lambda/guardduty_to_acl_lambda.py
12 2 1
def get_nacl_rules()
in scripts/gd2acl-sync-check.py
12 2 1
def find_values()
in lambda/guardduty_to_acl_lambda.py
10 2 2
def get_ddb_ips()
in lambda/guardduty_to_acl_lambda.py
9 2 0