aws-samples / amazon-sagemaker-safe-deployment-pipeline
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 47 units with 751 lines of code in units (26.2% 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)
    • 5 simple units (269 lines of code)
    • 42 very simple units (482 lines of code)
0% | 0% | 0% | 35% | 64%
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% | 35% | 64%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
custom_resource0% | 0% | 0% | 36% | 63%
api0% | 0% | 0% | 66% | 33%
model0% | 0% | 0% | 7% | 92%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def get_processing_request()
in custom_resource/sagemaker_suggest_baseline.py
128 10 2
def lambda_handler()
in custom_resource/sagemaker_create_experiment.py
43 9 2
def lambda_handler()
in api/pre_traffic_hook.py
45 8 2
def lambda_handler()
in api/post_traffic_hook.py
42 7 2
def get_pipeline_execution_id()
in model/run_pipeline.py
11 6 2
def get_baseline_drift()
in custom_resource/sagemaker_query_drift.py
15 5 1
def lambda_handler()
in custom_resource/sagemaker_query_drift.py
33 5 2
def is_processing_job_ready()
in custom_resource/sagemaker_suggest_baseline.py
17 5 1
def stop_processing_job()
in custom_resource/sagemaker_suggest_baseline.py
21 5 1
def stop_training_job()
in custom_resource/sagemaker_training_job.py
21 5 1
def lambda_handler()
in custom_resource/sagemaker_add_transform_header.py
23 5 2
36 5 2
def is_training_job_ready()
in custom_resource/sagemaker_training_job.py
20 4 1
def get_training_request()
in custom_resource/sagemaker_training_job.py
12 4 1
def lambda_handler()
in custom_resource/sagemaker_query_training.py
18 3 2
def create_graph()
in model/run_pipeline.py
13 3 3
def get_file_name()
in custom_resource/sagemaker_suggest_baseline.py
7 2 1
def get_bucket_prefix()
in api/post_traffic_hook.py
7 2 1
def create_baseline_step()
in model/run_pipeline.py
59 2 4
def get_pipeline_revisions()
in model/run_pipeline.py
8 2 2