aws / sagemaker-example-notebooks-testing
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 150 units with 1,844 lines of code in units (53.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 7 medium complex units (363 lines of code)
    • 13 simple units (280 lines of code)
    • 130 very simple units (1,201 lines of code)
0% | 0% | 19% | 15% | 65%
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% | 23% | 20% | 56%
ts0% | 0% | 9% | 0% | 90%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/images/codebuild-image/python/src/notebooks/cli0% | 0% | 40% | 0% | 59%
lib/images/processing-image0% | 0% | 86% | 0% | 13%
lib/images/codebuild-image/python/src/notebooks0% | 0% | 12% | 23% | 64%
lib0% | 0% | 9% | 0% | 90%
lambda/python-functions0% | 0% | 7% | 50% | 42%
scripts0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in cdk-project/lib/common.ts
45 16 1
def check_grammar()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/lint.py
29 14 1
def kernel_type_for()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/kernels.py
45 13 1
def run_notebook()
in cdk-project/lib/images/processing-image/execute.py
76 13 0
def find_stale_builds()
in cdk-project/lambda/python-functions/github_webhook_receiver.py
21 12 2
def main()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/cli/describe_notebook_jobs.py
81 11 0
def main()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/cli/run_pr_notebooks.py
66 11 0
def describe_runs()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/run.py
20 10 4
def stop_resources()
in cdk-project/lambda/python-functions/clean_endpoints.py
31 10 3
def batch_delete_resources()
in cdk-project/lambda/python-functions/clean_endpoints.py
25 10 3
def describe_run()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/run.py
43 8 2
def check_file_references()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/parse.py
15 8 1
def _create_s3_bucket_if_it_does_not_exist()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/utils.py
24 7 3
def kernel_image_for()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/kernels.py
15 7 1
def contains_code()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/parse.py
10 7 2
def get_resources()
in cdk-project/lambda/python-functions/clean_endpoints.py
23 7 4
def batch_stop_resources()
in cdk-project/lambda/python-functions/clean_endpoints.py
21 7 3
def find_version_tag()
in cdk-project/lib/images/codebuild-image/python/src/notebooks/git.py
15 6 1
def delete_experiment()
in cdk-project/lambda/python-functions/clean_endpoints.py
25 6 2
def delete_resources()
in cdk-project/lambda/python-functions/clean_endpoints.py
13 6 3