aws-samples / automating-livestream-video-monitoring
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 177 units with 2,248 lines of code in units (37.3% of code).
    • 0 very long units (0 lines of code)
    • 3 long units (191 lines of code)
    • 29 medium size units (863 lines of code)
    • 47 small units (687 lines of code)
    • 98 very small units (507 lines of code)
0% | 8% | 38% | 30% | 22%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 9% | 37% | 30% | 22%
js0% | 0% | 43% | 30% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
broadcast-monitoring/scripts0% | 19% | 34% | 29% | 15%
broadcast-monitoring/src/frame_extractor0% | 70% | 0% | 29% | 0%
broadcast-monitoring/infrastructure/elemental0% | 16% | 53% | 17% | 11%
broadcast-monitoring/src/sharedlib0% | 0% | 24% | 34% | 41%
broadcast-monitoring-ui/src/graphql0% | 0% | 83% | 0% | 16%
broadcast-monitoring/src/logo_detect0% | 0% | 50% | 22% | 27%
broadcast-monitoring/src/consolidate_frame_results0% | 0% | 39% | 13% | 46%
broadcast-monitoring/src/reuse_detections0% | 0% | 81% | 18% | 0%
broadcast-monitoring-ui/amplify/backend0% | 0% | 47% | 45% | 7%
broadcast-monitoring/src/manifest_parser0% | 0% | 100% | 0% | 0%
broadcast-monitoring/src/team_detection0% | 0% | 44% | 52% | 2%
broadcast-monitoring/src/sports_detect0% | 0% | 76% | 0% | 23%
broadcast-monitoring/src/appsync_notify0% | 0% | 50% | 50% | 0%
broadcast-monitoring/src/expected_program0% | 0% | 35% | 45% | 20%
broadcast-monitoring/src/consolidate_results0% | 0% | 42% | 22% | 34%
broadcast-monitoring/src/audio_detect0% | 0% | 0% | 83% | 16%
broadcast-monitoring-ui/src0% | 0% | 0% | 57% | 42%
broadcast-monitoring/src/crop_detection0% | 0% | 0% | 71% | 28%
broadcast-monitoring/src/start_sfn_execution0% | 0% | 0% | 76% | 24%
broadcast-monitoring-ui/src/router0% | 0% | 0% | 100% | 0%
broadcast-monitoring-ui/src/store0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def build_parent_parser()
in broadcast-monitoring/scripts/generate-logo-images.py
74 1 0
def extract_frames()
in broadcast-monitoring/src/frame_extractor/frame_extractor.py
63 12 7
def create_endpoint()
in broadcast-monitoring/infrastructure/elemental/custom_resources/custom-resource-py/libs/mediapackage.py
54 4 1
getSegmentDetails()
in broadcast-monitoring-ui/src/graphql/queries.js
48 1 2
def create_channel()
in broadcast-monitoring/infrastructure/elemental/custom_resources/custom-resource-py/libs/medialive.py
44 2 1
def execute()
in broadcast-monitoring/src/logo_detect/app/team_logo_check.py
43 16 3
function parseFrameTeamCheckResult()
in broadcast-monitoring-ui/amplify/backend/function/fetchSegmentDetail/src/index.js
40 7 1
def build_output_manifest_line()
in broadcast-monitoring/scripts/generate-logo-images.py
39 4 5
def create_pull_input()
in broadcast-monitoring/infrastructure/elemental/custom_resources/custom-resource-py/libs/medialive.py
37 3 1
def lambda_handler()
in broadcast-monitoring/src/manifest_parser/main.py
34 1 2
def create_push_input()
in broadcast-monitoring/infrastructure/elemental/custom_resources/custom-resource-py/libs/medialive.py
32 3 1
def execute()
in broadcast-monitoring/src/team_detection/app/team_text_check.py
31 9 3
def create()
in broadcast-monitoring/infrastructure/elemental/custom_resources/custom-resource-py/lambda.py
31 7 2
def lambda_handler()
in broadcast-monitoring/src/sports_detect/app/main.py
30 5 2
def consolidate_fragment_lambda_handler()
in broadcast-monitoring/src/consolidate_frame_results/app/main.py
29 12 2
def lambda_handler()
in broadcast-monitoring/src/logo_detect/app/main.py
29 5 3
def push_appsync()
in broadcast-monitoring/src/appsync_notify/app/appsync_push_notification.py
29 3 6
def convert_csv_to_ddb()
in broadcast-monitoring/src/sharedlib/common/utils.py
28 9 5
def lambda_handler()
in broadcast-monitoring/src/expected_program/app/main.py
28 5 2
def consolidate_team_data_lambda_handler()
in broadcast-monitoring/src/consolidate_frame_results/app/main.py
27 11 2