aws-samples / automating-livestream-video-monitoring
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 177 units with 2,248 lines of code in units (37.3% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (162 lines of code)
    • 20 simple units (399 lines of code)
    • 153 very simple units (1,687 lines of code)
0% | 0% | 7% | 17% | 75%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 8% | 18% | 73%
js0% | 0% | 0% | 15% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
broadcast-monitoring/src/frame_extractor0% | 0% | 70% | 0% | 29%
broadcast-monitoring/src/consolidate_frame_results0% | 0% | 39% | 20% | 39%
broadcast-monitoring/src/logo_detect0% | 0% | 29% | 0% | 70%
broadcast-monitoring/src/sharedlib0% | 0% | 0% | 23% | 76%
broadcast-monitoring/scripts0% | 0% | 0% | 23% | 76%
broadcast-monitoring/src/team_detection0% | 0% | 0% | 97% | 2%
broadcast-monitoring-ui/amplify/backend0% | 0% | 0% | 47% | 52%
broadcast-monitoring/infrastructure/elemental0% | 0% | 0% | 9% | 90%
broadcast-monitoring/src/audio_detect0% | 0% | 0% | 41% | 58%
broadcast-monitoring/src/reuse_detections0% | 0% | 0% | 42% | 57%
broadcast-monitoring-ui/src/graphql0% | 0% | 0% | 0% | 100%
broadcast-monitoring/src/expected_program0% | 0% | 0% | 0% | 100%
broadcast-monitoring/src/consolidate_results0% | 0% | 0% | 0% | 100%
broadcast-monitoring/src/appsync_notify0% | 0% | 0% | 0% | 100%
broadcast-monitoring-ui/src0% | 0% | 0% | 0% | 100%
broadcast-monitoring/src/sports_detect0% | 0% | 0% | 0% | 100%
broadcast-monitoring/src/crop_detection0% | 0% | 0% | 0% | 100%
broadcast-monitoring/src/manifest_parser0% | 0% | 0% | 0% | 100%
broadcast-monitoring-ui/src/store0% | 0% | 0% | 0% | 100%
broadcast-monitoring/src/start_sfn_execution0% | 0% | 0% | 0% | 100%
broadcast-monitoring-ui/src/router0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def execute()
in broadcast-monitoring/src/logo_detect/app/team_logo_check.py
43 16 3
def consolidate_fragment_lambda_handler()
in broadcast-monitoring/src/consolidate_frame_results/app/main.py
29 12 2
def extract_frames()
in broadcast-monitoring/src/frame_extractor/frame_extractor.py
63 12 7
def consolidate_team_data_lambda_handler()
in broadcast-monitoring/src/consolidate_frame_results/app/main.py
27 11 2
def execute()
in broadcast-monitoring/src/team_detection/app/team_text_check.py
31 9 3
def convert_csv_to_ddb()
in broadcast-monitoring/src/sharedlib/common/utils.py
28 9 5
def build_augmenters()
in broadcast-monitoring/scripts/generate-logo-images.py
25 9 2
function parseFrameTeamCheckResult()
in broadcast-monitoring-ui/amplify/backend/function/fetchSegmentDetail/src/index.js
40 7 1
def station_logo_check()
in broadcast-monitoring/src/consolidate_frame_results/app/checks.py
10 7 1
def detect_team_from_text_in_image()
in broadcast-monitoring/src/team_detection/app/team_text_check.py
20 7 2
def lambda_handler()
in broadcast-monitoring/src/team_detection/app/text_in_image.py
17 7 2
def get_last_segment_and_start_timestamp()
in broadcast-monitoring/src/sharedlib/common/manifest_parser.py
21 7 1
def load_items_from_yaml()
in broadcast-monitoring/src/sharedlib/sports_data/team.py
24 7 2
def create()
in broadcast-monitoring/infrastructure/elemental/custom_resources/custom-resource-py/lambda.py
31 7 2
def set_alpha()
in broadcast-monitoring/scripts/generate-logo-images.py
19 7 4
def team_text_check()
in broadcast-monitoring/src/consolidate_frame_results/app/checks.py
20 6 1
def parse_volume_output()
in broadcast-monitoring/src/audio_detect/app/audio_detect.py
12 6 1
def execute_ffmpeg()
in broadcast-monitoring/src/audio_detect/app/audio_detect.py
14 6 3
def convert_to_ddb()
in broadcast-monitoring/src/sharedlib/common/utils.py
9 6 1
def convert_from_ddb()
in broadcast-monitoring/src/sharedlib/common/utils.py
9 6 1