neo-ai / neo-ai-dlr
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 408 units with 4,676 lines of code in units (66.7% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (97 lines of code)
    • 9 medium complex units (462 lines of code)
    • 39 simple units (1,044 lines of code)
    • 359 very simple units (3,073 lines of code)
0% | 2% | 9% | 22% | 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
cc0% | 4% | 7% | 21% | 66%
py0% | 0% | 13% | 21% | 64%
js0% | 0% | 0% | 48% | 51%
h0% | 0% | 0% | 0% | 100%
java0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src0% | 5% | 9% | 23% | 61%
container0% | 0% | 14% | 29% | 55%
python0% | 0% | 9% | 11% | 79%
sagemaker-neo-notebooks0% | 0% | 0% | 13% | 86%
install0% | 0% | 0% | 0% | 100%
include0% | 0% | 0% | 0% | 100%
aar0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
97 27 1
69 24 1
def __init__()
in container/sagemaker-tensorflow-inferentia/build_artifacts/sagemaker/serve.py
59 20 1
def find_lib_path()
in python/dlr/libpath.py
41 20 3
void dlr::InitModelPath()
in src/dlr_common.cc
52 17 2
def preprocess()
in container/neo_template_mxnet_byom.py
48 16 2
48 14 1
def _handle_load_model_post()
in container/sagemaker-tensorflow-inferentia/build_artifacts/sagemaker/python_service.py
81 12 3
def preprocess()
in container/neo_template_xgboost.py
45 12 2
def run()
in python/dlr/dlr_model.py
19 11 2
41 10 4
def _setup_gunicorn()
in container/sagemaker-tensorflow-inferentia/build_artifacts/sagemaker/serve.py
42 9 1
std::string GetVersion()
in src/dlr_treelite.cc
19 9 1
def tvm_compile()
in container/ec2_compilation_container/tvm_ec2_compiler_utils.py
38 8 4
def _monitor()
in container/sagemaker-tensorflow-inferentia/build_artifacts/sagemaker/serve.py
19 8 1
def preprocess()
in container/neo_template_image_classification.py
28 8 2
def initialize()
in container/neo_template_mxnet_byom.py
36 8 2
DLRBackend dlr::GetBackend()
in src/dlr_common.cc
17 8 1
function parse_custom_attributes()
in container/sagemaker-tensorflow-inferentia/build_artifacts/sagemaker/tensorflow-serving.js
27 7 1
function csv_request()
in container/sagemaker-tensorflow-inferentia/build_artifacts/sagemaker/tensorflow-serving.js
33 7 1