aws-samples / sagemaker-studio-image-build-cli
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 19 units with 295 lines of code in units (66.1% 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)
    • 4 simple units (119 lines of code)
    • 15 very simple units (176 lines of code)
0% | 0% | 0% | 40% | 59%
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% | 40% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
sagemaker_studio_image_build0% | 0% | 0% | 40% | 59%
Most Complex Units
Top 19 most complex units
Unit# linesMcCabe index# params
def validate_args()
in sagemaker_studio_image_build/cli.py
20 8 2
def __init__()
in sagemaker_studio_image_build/codebuild.py
32 8 6
def log_stream()
in sagemaker_studio_image_build/logs.py
32 6 4
def upload_zip_file()
in sagemaker_studio_image_build/builder.py
35 6 4
def get_role()
in sagemaker_studio_image_build/cli.py
13 5 1
def build()
in sagemaker_studio_image_build/codebuild.py
10 3 2
def construct_vpc_config()
in sagemaker_studio_image_build/cli.py
10 2 1
def main()
in sagemaker_studio_image_build/cli.py
52 2 0
def __enter__()
in sagemaker_studio_image_build/codebuild.py
29 2 1
def _wait_for_build()
in sagemaker_studio_image_build/codebuild.py
11 2 3
def _create_repo_if_required()
in sagemaker_studio_image_build/codebuild.py
7 2 1
def _get_image_uri()
in sagemaker_studio_image_build/codebuild.py
10 2 1
def _get_studio_metadata()
in sagemaker_studio_image_build/codebuild.py
7 2 1
def logs_for_build()
in sagemaker_studio_image_build/logs.py
2 1 0
def build_image()
in sagemaker_studio_image_build/cli.py
6 1 2
def __exit__()
in sagemaker_studio_image_build/codebuild.py
2 1 2
def _start_build()
in sagemaker_studio_image_build/codebuild.py
5 1 1
def delete_zip_file()
in sagemaker_studio_image_build/builder.py
3 1 2
def build_image()
in sagemaker_studio_image_build/builder.py
9 1 7