aws-samples / ad-overlay-opportunity-detection
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 13 units with 125 lines of code in units (39.8% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (32 lines of code)
    • 3 small units (53 lines of code)
    • 9 very small units (40 lines of code)
0% | 0% | 25% | 42% | 32%
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% | 25% | 42% | 32%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/process_results0% | 0% | 34% | 35% | 30%
src/rekognition_call0% | 0% | 0% | 62% | 37%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
def process_rek_results()
in src/process_results/main.py
32 5 3
def send_video_file_to_rekognition()
in src/rekognition_call/main.py
20 1 2
def get_available_placement_text()
in src/process_results/ad_placements.py
20 10 1
def add_text_presence()
in src/process_results/ad_placements.py
13 3 2
def lambda_handler()
in src/rekognition_call/main.py
8 4 2
def lambda_handler()
in src/process_results/main.py
8 3 2
def format_time()
in src/process_results/ad_placements.py
7 1 2
def is_video_file()
in src/rekognition_call/main.py
4 1 1
def __init__()
in src/process_results/ad_placements.py
3 1 2
def get_output_filename()
in src/process_results/main.py
3 1 1
def write_output()
in src/process_results/main.py
3 1 3
def set_video_length()
in src/process_results/ad_placements.py
2 1 2
def is_word_box_large_enough()
in src/process_results/main.py
2 2 1