aws-solutions / aws-media-insights-engine
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 230 units with 6,301 lines of code in units (51.8% of code).
    • 5 very long units (723 lines of code)
    • 43 long units (3,027 lines of code)
    • 46 medium size units (1,320 lines of code)
    • 51 small units (760 lines of code)
    • 85 very small units (471 lines of code)
11% | 48% | 20% | 12% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py11% | 48% | 20% | 12% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
source/operators16% | 60% | 12% | 7% | 3%
source/dataplaneapi19% | 38% | 24% | 11% | 5%
source/workflowapi0% | 33% | 28% | 21% | 16%
source/workflow0% | 53% | 31% | 11% | 3%
source/dataplanestream0% | 0% | 71% | 15% | 13%
source/anonymous-data-logger0% | 0% | 80% | 19% | 0%
source/lib0% | 0% | 25% | 37% | 37%
source/workflowstream0% | 0% | 74% | 0% | 25%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in source/operators/thumbnail/start_thumbnail.py
225 3 2
def lambda_handler()
in source/operators/transcribe/start_transcribe.py
142 36 2
def put_asset_metadata()
in source/dataplaneapi/app.py
138 21 1
def lambda_handler()
in source/operators/translate/start_translate.py
116 20 2
def check_translate_webcaptions()
in source/operators/captions/webcaptions.py
102 17 2
def get_asset_metadata()
in source/dataplaneapi/app.py
99 24 1
def lambda_handler()
in source/operators/mediaconvert/start_media_convert.py
96 3 2
def complete_stage_execution()
in source/workflow/app.py
92 10 5
def create_operation()
in source/workflowapi/app.py
90 25 1
def lambda_handler()
in source/operators/comprehend/entities/start_entity_detection.py
89 8 2
def lambda_handler()
in source/operators/comprehend/key_phrases/start_key_phrases.py
89 8 2
def TranslateWebCaptions()
in source/operators/captions/webcaptions.py
83 18 6
def create_workflow_execution()
in source/workflowapi/app.py
82 11 2
def lambda_handler()
in source/operators/transcribe/get_transcribe.py
77 12 2
def lambda_handler()
in source/operators/rekognition/check_face_detection_status.py
77 11 2
def lambda_handler()
in source/operators/rekognition/check_technical_cue_status.py
76 10 2
def lambda_handler()
in source/operators/rekognition/check_shot_detection_status.py
76 11 2
def lambda_handler()
in source/operators/rekognition/check_person_tracking_status.py
76 11 2
def lambda_handler()
in source/operators/rekognition/check_face_search_status.py
76 11 2
def lambda_handler()
in source/operators/rekognition/check_celebrity_recognition_status.py
76 11 2