aws-samples / aws-vpc-traffic-mirroring-source-automation
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 39 units with 296 lines of code in units (47.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 2 medium size units (42 lines of code)
    • 8 small units (114 lines of code)
    • 29 very small units (140 lines of code)
0% | 0% | 14% | 38% | 47%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 14% | 38% | 47%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
traffic_mirroring0% | 0% | 14% | 38% | 47%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def handle_event()
in traffic_mirroring/app_helper.py
21 11 3
def create_session()
in traffic_mirroring/app_helper.py
21 4 3
def valid_target_config()
in traffic_mirroring/app_helper.py
19 7 2
def parse_sns_message()
in traffic_mirroring/backfill_handler.py
16 4 1
def get_or_create_target()
in traffic_mirroring/app_helper.py
15 3 3
def lambda_handler()
in traffic_mirroring/backfill_handler.py
14 5 2
def lambda_handler()
in traffic_mirroring/cloudwatch_event_handler.py
13 4 2
def create_target()
in traffic_mirroring/app_helper.py
13 2 4
def valid_list_field()
in traffic_mirroring/app_helper.py
12 6 2
def create_target_with_tag()
in traffic_mirroring/app_helper.py
12 1 3
def valid_tag_based_target_config()
in traffic_mirroring/app_helper.py
10 4 1
def parse_guardduty_event()
in traffic_mirroring/cloudwatch_event_handler.py
9 3 1
def valid_source_type()
in traffic_mirroring/app_helper.py
9 6 3
def requires_session()
in traffic_mirroring/app_helper.py
9 2 2
def load_config()
in traffic_mirroring/app_helper.py
8 2 0
def valid_config()
in traffic_mirroring/app_helper.py
8 4 1
def update_sns_config()
in traffic_mirroring/backfill_handler.py
7 2 2
def parse_event()
in traffic_mirroring/cloudwatch_event_handler.py
7 3 1
def launch_target_instance()
in traffic_mirroring/app_helper.py
7 1 3
def create_instance_object()
in traffic_mirroring/app_helper.py
6 1 1