aws-samples / aws-decoupled-serverless-scheduler
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 18 units with 300 lines of code in units (72.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 2 simple units (76 lines of code)
    • 16 very simple units (224 lines of code)
0% | 0% | 0% | 25% | 74%
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% | 0% | 25% | 74%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/trigger_step_function0% | 0% | 0% | 100% | 0%
src/s3_trigger0% | 0% | 0% | 100% | 0%
src/ec2_scale0% | 0% | 0% | 0% | 100%
src/dynamo_db0% | 0% | 0% | 0% | 100%
src/get_job0% | 0% | 0% | 0% | 100%
src/final_terminate0% | 0% | 0% | 0% | 100%
src/wait_ec20% | 0% | 0% | 0% | 100%
src/sqs_check0% | 0% | 0% | 0% | 100%
src/protect_ec20% | 0% | 0% | 0% | 100%
src/extract_job0% | 0% | 0% | 0% | 100%
src/add_sqs0% | 0% | 0% | 0% | 100%
src/failed_job0% | 0% | 0% | 0% | 100%
src/check_job0% | 0% | 0% | 0% | 100%
src/sqs_out0% | 0% | 0% | 0% | 100%
src/start_job0% | 0% | 0% | 0% | 100%
src/delete_job0% | 0% | 0% | 0% | 100%
src/confirm_result0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 18 most complex units
Unit# linesMcCabe index# params
def handler()
in src/s3_trigger/index.py
36 9 2
def handler()
in src/trigger_step_function/index.py
40 8 2
def handler()
in src/protect_ec2/index.py
13 3 2
def handler()
in src/add_sqs/index.py
12 3 2
def handler()
in src/ec2_scale/index.py
29 3 2
def handler()
in src/final_terminate/index.py
18 3 2
def handler()
in src/check_job/index.py
9 2 2
def handler()
in src/failed_job/index.py
10 2 2
def handler()
in src/dynamo_db/index.py
33 2 2
def handler()
in src/sqs_check/index.py
14 2 2
def handler()
in src/confirm_result/index.py
4 2 2
def handler()
in src/get_job/index.py
23 2 2
def handler()
in src/wait_ec2/index.py
15 1 2
def handler()
in src/sqs_out/index.py
9 1 2
def handler()
in src/extract_job/index.py
12 1 2
def handler()
in src/start_job/index.py
9 1 2
def new_capacity()
in src/ec2_scale/index.py
7 1 2
def handler()
in src/delete_job/index.py
7 1 2