aws-solutions / aws-media-insights-content-localization
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 39 units with 1,059 lines of code in units (8.5% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (173 lines of code)
    • 8 medium complex units (406 lines of code)
    • 3 simple units (125 lines of code)
    • 26 very simple units (355 lines of code)
0% | 16% | 38% | 11% | 33%
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% | 17% | 41% | 12% | 27%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/consumer0% | 22% | 51% | 5% | 20%
source/helper0% | 0% | 0% | 43% | 56%
source/anonymous-data-logger0% | 0% | 0% | 100% | 0%
source/website/src0% | 0% | 0% | 0% | 100%
source/anonymous-data-logger/lib0% | 0% | 0% | 0% | 100%
source/website/src/services0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex 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_generic_data()
in source/consumer/lambda_handler.py
58 19 3
def process_label_detection()
in source/consumer/lambda_handler.py
46 18 3
def process_text_detection()
in source/consumer/lambda_handler.py
50 17 3
def process_content_moderation()
in source/consumer/lambda_handler.py
44 15 3
def process_face_search()
in source/consumer/lambda_handler.py
60 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 copy_source()
in source/helper/website_helper.py
49 7 2
def lambda_handler()
in source/helper/website_helper.py
20 5 2
def process_transcribe()
in source/consumer/lambda_handler.py
24 4 4
def process_mediainfo()
in source/consumer/lambda_handler.py
10 3 3
def connect_es()
in source/consumer/lambda_handler.py
18 3 1
getSignedURL()
in source/website/src/services/urlsigner.js
16 3 2
def send()
in source/anonymous-data-logger/lib/cfnresponse.py
23 3 6
def process_entities()
in source/consumer/lambda_handler.py
18 2 3