awslabs / sagemaker-purchase-modelling
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 24 units with 236 lines of code in units (28.5% 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 (37 lines of code)
    • 22 very simple units (199 lines of code)
0% | 0% | 0% | 15% | 84%
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% | 15% | 84%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source0% | 0% | 0% | 32% | 67%
deployment/solution-assistant/src0% | 0% | 0% | 0% | 100%
source/notebooks/src/package0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def add_to_logbook()
in source/env_setup.py
16 7 2
def env_setup()
in source/env_setup.py
21 6 0
def in_logbook()
in source/env_setup.py
12 5 2
def on_delete()
in deployment/solution-assistant/src/lambda_function.py
21 5 2
def bash()
in source/env_setup.py
21 4 1
def get_current_folder()
in source/notebooks/src/package/utils.py
7 4 1
def delete_sagemaker_endpoint()
in deployment/solution-assistant/src/lambda_function.py
16 3 1
def delete_sagemaker_endpoint_config()
in deployment/solution-assistant/src/lambda_function.py
18 3 1
def delete_sagemaker_model()
in deployment/solution-assistant/src/lambda_function.py
13 3 1
def delete_monitoring_schedule()
in deployment/solution-assistant/src/lambda_function.py
11 3 1
def get_sagemaker_mode()
in source/env_setup.py
8 2 0
def get_hostname()
in source/env_setup.py
11 2 0
def delete_s3_objects()
in deployment/solution-assistant/src/lambda_function.py
13 2 1
def delete_s3_bucket()
in deployment/solution-assistant/src/lambda_function.py
13 2 1
def get_executable()
in source/env_setup.py
2 1 0
def parse_args()
in source/env_setup.py
6 1 0
def read_file()
in source/env_setup.py
3 1 1
def logging_setup()
in source/env_setup.py
3 1 1
def env_setup_notebook_instance()
in source/env_setup.py
5 1 0
def env_setup_studio()
in source/env_setup.py
5 1 0