awslabs / ec2-spot-workshops
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 16 units with 291 lines of code in units (3.4% 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)
    • 1 simple units (31 lines of code)
    • 15 very simple units (260 lines of code)
0% | 0% | 0% | 10% | 89%
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% | 10% | 89%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
content/rendering-with-batch0% | 0% | 0% | 21% | 78%
workshops/ec2-auto-scaling-with-multiple-instance-types-and-purchase-options0% | 0% | 0% | 0% | 100%
workshops/ecs-spot-capacity-providers0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 16 most complex units
Unit# linesMcCabe index# params
def read_blend_rend_chunk()
in content/rendering-with-batch/batch/batch.files/job_submission.py
31 9 1
def get_jobs_in_array()
in content/rendering-with-batch/rendering-with-batch.files/verifying_resilience.py
11 4 1
def show_execution_attempts()
in content/rendering-with-batch/rendering-with-batch.files/verifying_resilience.py
14 4 1
def submit_rendering_job()
in content/rendering-with-batch/batch/batch.files/job_submission.py
14 3 2
def exit_gracefully()
in workshops/ecs-spot-capacity-providers/webapp/app.py
6 3 3
def index()
in workshops/ecs-spot-capacity-providers/webapp/app.py
46 3 0
def parse_arguments()
in content/rendering-with-batch/batch/batch.files/job_submission.py
26 2 0
def get_number_of_frames()
in content/rendering-with-batch/batch/batch.files/job_submission.py
8 2 1
def calculate_array_job_size()
in content/rendering-with-batch/batch/batch.files/job_submission.py
5 2 0
def submit_stitching_job()
in content/rendering-with-batch/batch/batch.files/job_submission.py
16 2 1
def getInstanceLifecycle()
in workshops/ecs-spot-capacity-providers/webapp/app.py
8 2 2
def download_blender_file_from_s3()
in content/rendering-with-batch/batch/batch.files/job_submission.py
4 1 0
def build_job_kwargs()
in content/rendering-with-batch/batch/batch.files/job_submission.py
12 1 2
def checkSpotTermination()
in workshops/ecs-spot-capacity-providers/webapp/app.py
4 1 0
def __init__()
in workshops/ecs-spot-capacity-providers/webapp/app.py
3 1 1
def __init__()
in workshops/ec2-auto-scaling-with-multiple-instance-types-and-purchase-options/cdk/app.py
83 1 3