aws-samples / aws-autonomous-driving-data-lake-mwaa-ros-bag-image-extraction-pipeline
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 30 units with 535 lines of code in units (16.2% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (194 lines of code)
    • 5 medium size units (138 lines of code)
    • 8 small units (116 lines of code)
    • 14 very small units (87 lines of code)
0% | 36% | 25% | 21% | 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% | 36% | 25% | 21% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
dags/processing0% | 50% | 12% | 23% | 14%
service/app0% | 31% | 40% | 13% | 15%
plugins/sensors0% | 0% | 44% | 46% | 9%
infrastructure0% | 0% | 0% | 0% | 100%
service0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def process_labels()
in dags/processing/processing.py
80 8 4
def parse_bag()
in service/app/engine.py
60 8 1
def run_fargate_task()
in dags/processing/processing.py
54 3 1
def draw_bounding_box()
in dags/processing/processing.py
32 3 2
def download_bag_file()
in service/app/engine.py
29 4 1
def make_config_yaml()
in service/app/engine.py
28 5 2
def __init__()
in plugins/sensors/s3_metadata_sensor.py
28 4 10
def s3_sync_results()
in service/app/engine.py
21 8 3
def wait_for_extraction()
in dags/processing/processing.py
18 4 1
def add_s3_tag()
in dags/processing/processing.py
17 1 4
def get_wildcard_metadata_key()
in plugins/sensors/s3_metadata_sensor.py
17 7 6
def convert_csv_to_parquet()
in service/app/engine.py
14 5 2
def list_objects()
in dags/processing/processing.py
13 1 2
def label_images()
in dags/processing/processing.py
13 5 1
def upload_file()
in service/app/engine.py
12 4 3
def has_key_tags()
in plugins/sensors/s3_metadata_sensor.py
12 2 5
def determine_workload()
in dags/processing/processing.py
9 3 1
def draw_bounding_boxes()
in dags/processing/processing.py
9 4 1
def __init__()
in infrastructure/ecs_stack.py
9 1 0
def get_object()
in service/app/engine.py
8 1 3