aws-solutions / aws-media-insights-content-localization
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 1,059 lines of code in units (8.5% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (407 lines of code)
    • 10 medium size units (396 lines of code)
    • 11 small units (180 lines of code)
    • 12 very small units (76 lines of code)
0% | 38% | 37% | 16% | 7%
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% | 40% | 16% | 5%
js0% | 56% | 0% | 17% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/consumer0% | 45% | 36% | 12% | 5%
source/website/src0% | 85% | 0% | 0% | 14%
source/helper0% | 0% | 43% | 48% | 8%
source/anonymous-data-logger0% | 0% | 100% | 0% | 0%
source/anonymous-data-logger/lib0% | 0% | 62% | 37% | 0%
source/website/src/services0% | 0% | 0% | 51% | 48%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in source/consumer/lambda_handler.py
94 35 2
def process_celebrity_detection()
in source/consumer/lambda_handler.py
79 33 3
def process_face_detection()
in source/consumer/lambda_handler.py
64 19 3
def process_face_search()
in source/consumer/lambda_handler.py
60 15 3
def process_generic_data()
in source/consumer/lambda_handler.py
58 19 3
getRuntimeConfig()
in source/website/src/main.js
52 1 0
def process_text_detection()
in source/consumer/lambda_handler.py
50 17 3
def copy_source()
in source/helper/website_helper.py
49 7 2
def process_label_detection()
in source/consumer/lambda_handler.py
46 18 3
def process_content_moderation()
in source/consumer/lambda_handler.py
44 15 3
def process_technical_cue_detection()
in source/consumer/lambda_handler.py
42 13 3
def process_shot_detection()
in source/consumer/lambda_handler.py
42 13 3
def bulk_index()
in source/consumer/lambda_handler.py
42 10 4
def handler()
in source/anonymous-data-logger/anonymous-data-logger.py
34 8 2
def process_transcribe()
in source/consumer/lambda_handler.py
24 4 4
def send()
in source/anonymous-data-logger/lib/cfnresponse.py
23 3 6
def send_response()
in source/helper/website_helper.py
20 1 4
def lambda_handler()
in source/helper/website_helper.py
20 5 2
def process_entities()
in source/consumer/lambda_handler.py
18 2 3
def connect_es()
in source/consumer/lambda_handler.py
18 3 1