aws-samples / aws-autonomous-driving-data-lake-ros-bag-scene-detection-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 69 units with 883 lines of code in units (47.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (90 lines of code)
    • 12 medium size units (356 lines of code)
    • 14 small units (201 lines of code)
    • 42 very small units (236 lines of code)
0% | 10% | 40% | 22% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 10% | 40% | 22% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
infrastructure/emr_launch0% | 47% | 17% | 19% | 15%
infrastructure/emr_trigger/lambda_source0% | 0% | 75% | 14% | 9%
spark_scripts0% | 0% | 33% | 32% | 34%
ROOT0% | 0% | 100% | 0% | 0%
service/app0% | 0% | 34% | 12% | 52%
infrastructure0% | 0% | 0% | 100% | 0%
infrastructure/emr_orchestration0% | 0% | 0% | 0% | 100%
infrastructure/emr_trigger0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def __init__()
in infrastructure/emr_launch/cluster_definition.py
90 3 5
def handler()
in infrastructure/emr_trigger/lambda_source/trigger.py
41 7 2
def create_master_time_df()
in spark_scripts/synchronize_topics.py
35 3 2
def process_file()
in service/app/main.py
35 9 5
def summarize_person_scenes()
in spark_scripts/detect_scenes.py
33 5 1
def __init__()
in infrastructure/emr_launch/instance_group_config.py
33 1 0
def trigger_pipeline()
in infrastructure/emr_trigger/lambda_source/trigger.py
28 2 3
def fargate()
in app.py
27 1 2
def emr()
in app.py
27 2 2
def reset_batch()
in infrastructure/emr_trigger/lambda_source/trigger.py
26 1 5
def process_sns_message()
in infrastructure/emr_trigger/lambda_source/trigger.py
26 1 3
def is_object_in_lane()
in spark_scripts/detect_scenes.py
23 4 2
def synchronize_signals()
in spark_scripts/synchronize_topics.py
22 2 2
def load_and_union_data()
in spark_scripts/synchronize_topics.py
20 7 2
def obj_in_lane_detection()
in spark_scripts/detect_scenes.py
19 5 1
def main()
in spark_scripts/detect_scenes.py
18 2 6
def get_batch_file_metadata()
in spark_scripts/detect_scenes.py
16 2 2
def __init__()
in infrastructure/ecs_stack.py
16 1 0
def emr_resource_config()
in infrastructure/emr_launch/cluster_definition.py
14 1 0
def get_batch_file_metadata()
in spark_scripts/synchronize_topics.py
13 2 2