aws-samples / aws-network-firewall-rulegroups-with-proofpoints-emerging-threats-open-ruleset
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 22 units with 360 lines of code in units (50.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (64 lines of code)
    • 3 medium size units (107 lines of code)
    • 10 small units (130 lines of code)
    • 8 very small units (59 lines of code)
0% | 17% | 29% | 36% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 17% | 29% | 36% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ingest_suricata_rules0% | 17% | 29% | 36% | 16%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in ingest_suricata_rules/rules_processor.py
64 18 2
def lambda_handler()
in ingest_suricata_rules/convert_ids_ips.py
47 8 2
def process_ruleset()
in ingest_suricata_rules/rules_processor.py
33 20 1
def download_ruleset()
in ingest_suricata_rules/rules_downloader.py
27 3 2
def get_rulegroups_summary()
in ingest_suricata_rules/summary_report.py
16 2 1
def extract_ruleset()
in ingest_suricata_rules/rules_downloader.py
15 3 1
def replace_rule_vars_with_values()
in ingest_suricata_rules/rules_processor.py
15 9 2
def split_files()
in ingest_suricata_rules/rules_processor.py
15 5 4
def lambda_handler()
in ingest_suricata_rules/rules_downloader.py
12 2 2
def check_rule_group_exists()
in ingest_suricata_rules/convert_ids_ips.py
12 4 1
def check_rule_group_exists()
in ingest_suricata_rules/rules_processor.py
12 4 1
def save_rulesets()
in ingest_suricata_rules/convert_ids_ips.py
11 3 4
def save_rulesets()
in ingest_suricata_rules/rules_processor.py
11 3 4
def trigger_ids_to_ips()
in ingest_suricata_rules/rules_processor.py
11 3 3
def convert_ids_ips()
in ingest_suricata_rules/convert_ids_ips.py
10 4 1
def get_deployed_ruleset_version_from_ssm()
in ingest_suricata_rules/rules_downloader.py
9 2 1
def get_rulegroups_to_convert()
in ingest_suricata_rules/rules_processor.py
9 2 1
def update_version_in_ssm()
in ingest_suricata_rules/rules_downloader.py
7 1 2
def get_current_ruleset_version_from_url()
in ingest_suricata_rules/rules_downloader.py
6 2 1
def get_rule_group()
in ingest_suricata_rules/convert_ids_ips.py
6 1 1