aws / deep-learning-containers
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 307 units with 3,750 lines of code in units (40.1% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (185 lines of code)
    • 10 medium complex units (461 lines of code)
    • 37 simple units (928 lines of code)
    • 258 very simple units (2,176 lines of code)
0% | 4% | 12% | 24% | 58%
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% | 5% | 13% | 22% | 58%
js0% | 0% | 0% | 48% | 51%
c0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 13% | 8% | 18% | 60%
tensorflow0% | 0% | 16% | 31% | 51%
scheduler0% | 0% | 15% | 12% | 72%
pytorch0% | 0% | 0% | 34% | 65%
release0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
habana0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def main()
in src/main.py
54 42 0
def image_builder()
in src/image_builder.py
131 39 1
39 19 2
def main()
in src/start_testbuilds.py
33 14 0
def is_test_job_enabled()
in src/start_testbuilds.py
13 12 1
def query_status()
in scheduler/job_requester/requester.py
32 12 2
def _handle_load_model_post()
in tensorflow/inference/docker/build_artifacts/sagemaker_neuron/python_service.py
80 12 3
def start()
in tensorflow/inference/docker/build_artifacts/sagemaker_neuron/serve.py
41 12 1
def _handle_load_model_post()
in tensorflow/inference/docker/build_artifacts/sagemaker/python_service.py
81 12 3
def __init__()
in tensorflow/inference/docker/build_artifacts/sagemaker/serve.py
57 12 1
def build_setup()
in src/utils.py
30 11 4
def __init__()
in tensorflow/inference/docker/build_artifacts/sagemaker_neuron/serve.py
55 11 1
25 10 3
29 10 3
21 9 3
def override()
in src/buildspec.py
15 9 2
def _setup_gunicorn()
in tensorflow/inference/docker/build_artifacts/sagemaker_neuron/serve.py
37 9 1
def _setup_gunicorn()
in tensorflow/inference/docker/build_artifacts/sagemaker/serve.py
42 9 1
10 8 2
def build()
in src/image.py
17 8 1