awslabs / live-streaming-with-automated-multi-language-subtitling
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 43 units with 866 lines of code in units (86.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (246 lines of code)
    • 5 simple units (295 lines of code)
    • 34 very simple units (325 lines of code)
0% | 0% | 28% | 34% | 37%
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% | 32% | 39% | 27%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lambdafunctions/lambdaedge0% | 0% | 85% | 0% | 14%
customresources/custom-resource-py0% | 0% | 100% | 0% | 0%
customresources/custom-resource-py/lib0% | 0% | 0% | 71% | 28%
lambdafunctions/SNSTriggerAWSTranslateLambda0% | 0% | 0% | 25% | 74%
transcribedocker0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_environment_variables()
in source/lambdafunctions/lambdaedge/lambda_function.py
58 18 1
def lambda_handler()
in source/lambdafunctions/lambdaedge/lambda_function.py
88 16 2
def handler()
in source/customresources/custom-resource-py/lambda.py
52 16 2
def caption_latest()
in source/lambdafunctions/lambdaedge/lambda_function.py
48 11 2
def create_input()
in source/customresources/custom-resource-py/lib/medialive.py
79 7 1
def create_channel()
in source/customresources/custom-resource-py/lib/medialive.py
87 7 1
def delete_channel()
in source/customresources/custom-resource-py/lib/medialive.py
29 7 1
def lambda_handler()
in source/lambdafunctions/SNSTriggerAWSTranslateLambda/lambda_function.py
18 6 2
def create_endpoint()
in source/customresources/custom-resource-py/lib/mediapackage.py
82 6 1
def make_all_transcriptions()
in source/lambdafunctions/SNSTriggerAWSTranslateLambda/lambda_function.py
9 5 3
def put_dynamo()
in source/lambdafunctions/SNSTriggerAWSTranslateLambda/lambda_function.py
13 4 2
for await()
in source/transcribedocker/transcribe-to-dynamo-withSDK.js
6 3 1
let handleEventStreamMessage = function()
in source/transcribedocker/transcribe-to-dynamo-withSDK.js
12 3 1
def str_to_bool()
in source/lambdafunctions/lambdaedge/lambda_function.py
7 3 1
def str_to_bool()
in source/lambdafunctions/SNSTriggerAWSTranslateLambda/lambda_function.py
7 3 1
def create_channel()
in source/customresources/custom-resource-py/lib/mediapackage.py
20 3 1
def send()
in source/customresources/custom-resource-py/lib/cfnresponse.py
23 3 6
async function startStreamingWrapper()
in source/transcribedocker/transcribe-to-dynamo-withSDK.js
11 2 1
for await()
in source/transcribedocker/transcribe-to-dynamo-withSDK.js
3 2 1
AudioStream: transcribeInput()
in source/transcribedocker/transcribe-to-dynamo-withSDK.js
4 2 0