aws-samples / amazon-sagemaker-cdk-examples
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 25 units with 728 lines of code in units (45.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (157 lines of code)
    • 1 simple units (14 lines of code)
    • 22 very simple units (557 lines of code)
0% | 0% | 21% | 1% | 76%
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% | 22% | 2% | 75%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
dask-fargate/dask_fargate0% | 0% | 100% | 0% | 0%
auto-model-deploy/lambda0% | 0% | 69% | 14% | 15%
stepfn-batch0% | 0% | 0% | 0% | 100%
cron-train0% | 0% | 0% | 0% | 100%
notebook-teams/multinotebookefs0% | 0% | 0% | 0% | 100%
auto-model-deploy0% | 0% | 0% | 0% | 100%
cron-inference0% | 0% | 0% | 0% | 100%
kinesis-inference0% | 0% | 0% | 0% | 100%
dask-fargate/cdk.out0% | 0% | 0% | 0% | 100%
dask-fargate/binderhub0% | 0% | 0% | 0% | 100%
api-lambda-sm0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def deploy_model()
in auto-model-deploy/lambda/deploy-model.py
67 13 1
def __init__()
in dask-fargate/dask_fargate/dask_fargate_stack.py
90 11 4
def valid_json()
in auto-model-deploy/lambda/deploy-model.py
14 8 1
def __init__()
in notebook-teams/multinotebookefs/multinotebookefs_stack.py
62 5 4
def _merge_dictionaries()
in dask-fargate/binderhub/binderhub_config.py
11 5 2
def get_value()
in dask-fargate/binderhub/binderhub_config.py
10 5 2
async function getAdopter()
in dask-fargate/cdk.out/asset.a65ac4beaa2b5a7b20eebf3b7c5c1c886b71428afa377e02dab0d10ab3be57e7/handler.js
10 5 1
def __init__()
in auto-model-deploy/app.py
59 4 3
def _load_values()
in dask-fargate/binderhub/binderhub_config.py
12 3 0
def lambda_handler()
in auto-model-deploy/lambda/deploy-model.py
12 2 2
def lambda_handler()
in cron-train/lambda-handler.py
12 2 2
function respondCFN()
in dask-fargate/cdk.out/asset.a65ac4beaa2b5a7b20eebf3b7c5c1c886b71428afa377e02dab0d10ab3be57e7/handler.js
30 2 4
def lambda_handler()
in stepfn-batch/lambda-submit.py
35 2 2
def __init__()
in cron-inference/app.py
33 1 3
def lambda_handler()
in cron-inference/lambda-handler.py
14 1 2
def __init__()
in api-lambda-sm/app.py
18 1 3
def lambda_handler()
in api-lambda-sm/lambda-handler.py
11 1 2
def lambda_handler()
in auto-model-deploy/lambda/check-status.py
3 1 2
def __init__()
in cron-train/app.py
31 1 3
def run_training()
in cron-train/lambda-handler.py
61 1 0