awslabs / sagemaker-deep-demand-forecast
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 34 units with 320 lines of code in units (29.0% 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 (32 lines of code)
    • 33 very simple units (288 lines of code)
0% | 0% | 0% | 10% | 90%
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% | 90%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/container_build0% | 0% | 0% | 57% | 42%
src/deep_demand_forecast0% | 0% | 0% | 0% | 100%
cloudformation/solution-assistant/src0% | 0% | 0% | 0% | 100%
src/preprocess0% | 0% | 0% | 0% | 100%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def log_stream()
in src/container_build/logs.py
32 6 4
def str2bool()
in src/deep_demand_forecast/utils.py
9 4 1
def multivar_df()
in src/deep_demand_forecast/monitor.py
12 4 1
def delete_ecr_images()
in cloudformation/solution-assistant/src/lambda_fn.py
27 4 1
def _max_normalize()
in src/preprocess/preprocess.py
6 3 2
def delete_sagemaker_endpoint()
in cloudformation/solution-assistant/src/lambda_fn.py
10 3 1
def delete_sagemaker_endpoint_config()
in cloudformation/solution-assistant/src/lambda_fn.py
16 3 1
def delete_sagemaker_model()
in cloudformation/solution-assistant/src/lambda_fn.py
10 3 1
def apply()
in src/preprocess/preprocess.py
14 2 1
def build()
in src/container_build/container_build.py
7 2 2
def _wait_for_build()
in src/container_build/container_build.py
10 2 3
def load_multivariate_datasets()
in src/deep_demand_forecast/data.py
11 2 1
def delete_s3_objects()
in cloudformation/solution-assistant/src/lambda_fn.py
7 2 1
def delete_s3_bucket()
in cloudformation/solution-assistant/src/lambda_fn.py
7 2 1
def on_delete()
in cloudformation/solution-assistant/src/lambda_fn.py
14 2 2
def set_kernel_spec()
in scripts/set_kernelspec.py
9 2 3
def __init__()
in src/preprocess/preprocess.py
3 1 2
def save_datasets()
in src/preprocess/preprocess.py
2 1 3
def main()
in src/preprocess/get_base_image.py
9 1 4
def load_dataset()
in src/preprocess/data_preprocessor.py
10 1 2