aws / sagemaker-mxnet-inference-toolkit
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 20 units with 127 lines of code in units (34.0% 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)
    • 1 simple units (16 lines of code)
    • 19 very simple units (111 lines of code)
0% | 0% | 0% | 12% | 87%
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% | 12% | 87%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/sagemaker_mxnet_serving_container0% | 0% | 0% | 12% | 87%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def default_model_fn()
in src/sagemaker_mxnet_serving_container/default_inference_handler.py
16 6 3
def _user_module_transformer()
in src/sagemaker_mxnet_serving_container/handler_service.py
18 5 1
def default_input_fn()
in src/sagemaker_mxnet_serving_container/default_inference_handler.py
21 5 4
def _update_mxnet_env_vars()
in src/sagemaker_mxnet_serving_container/serving.py
4 3 0
def _call_input_fn()
in src/sagemaker_mxnet_serving_container/mxnet_module_transformer.py
8 3 4
def read_data_shapes()
in src/sagemaker_mxnet_serving_container/utils.py
13 3 2
def default_output_fn()
in src/sagemaker_mxnet_serving_container/default_inference_handler.py
5 3 3
def initialize()
in src/sagemaker_mxnet_serving_container/handler_service.py
10 2 2
def _retry_if_error()
in src/sagemaker_mxnet_serving_container/serving.py
2 2 1
def default_input_fn()
in src/sagemaker_mxnet_serving_container/default_inference_handler.py
6 2 3
def __init__()
in src/sagemaker_mxnet_serving_container/handler_service.py
2 1 1
def _start_model_server()
in src/sagemaker_mxnet_serving_container/serving.py
2 1 0
def main()
in src/sagemaker_mxnet_serving_container/serving.py
3 1 0
def __init__()
in src/sagemaker_mxnet_serving_container/mxnet_module_transformer.py
2 1 1
def _default_transform_fn()
in src/sagemaker_mxnet_serving_container/mxnet_module_transformer.py
5 1 5
def get_default_context()
in src/sagemaker_mxnet_serving_container/utils.py
2 1 0
def parse_accept()
in src/sagemaker_mxnet_serving_container/utils.py
2 1 1
def default_predict_fn()
in src/sagemaker_mxnet_serving_container/default_inference_handler.py
2 1 3
def default_predict_fn()
in src/sagemaker_mxnet_serving_container/default_inference_handler.py
2 1 3
def read()
in setup.py
2 1 1