aws / sagemaker-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 54 units with 340 lines of code in units (58.4% 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)
    • 2 simple units (58 lines of code)
    • 52 very simple units (282 lines of code)
0% | 0% | 0% | 17% | 82%
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% | 17% | 82%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
src/sagemaker_inference0% | 0% | 0% | 17% | 82%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _validate_user_module_and_set_functions()
in src/sagemaker_inference/transformer.py
26 10 1
def transform()
in src/sagemaker_inference/transformer.py
32 9 3
def _retrieve_mms_server_process()
in src/sagemaker_inference/model_server.py
10 5 0
def start_model_server()
in src/sagemaker_inference/model_server.py
26 4 1
def _generate_mms_config_properties()
in src/sagemaker_inference/model_server.py
19 4 0
def __init__()
in src/sagemaker_inference/errors.py
4 3 4
def _parse_module_name()
in src/sagemaker_inference/environment.py
4 3 1
def retrieve_content_type_header()
in src/sagemaker_inference/utils.py
5 3 1
def default_output_fn()
in src/sagemaker_inference/default_inference_handler.py
5 3 3
def _reap_children()
in src/sagemaker_inference/model_server.py
7 3 2
def _array_to_json()
in src/sagemaker_inference/encoder.py
6 2 1
def encode()
in src/sagemaker_inference/encoder.py
6 2 2
def __init__()
in src/sagemaker_inference/default_handler_service.py
2 2 2
def initialize()
in src/sagemaker_inference/default_handler_service.py
9 2 2
def remove_crlf()
in src/sagemaker_inference/utils.py
6 2 1
def find_spec()
in src/sagemaker_inference/transformer.py
6 2 1
def __init__()
in src/sagemaker_inference/transformer.py
10 2 2
def validate_and_initialize()
in src/sagemaker_inference/transformer.py
6 2 2
def decode()
in src/sagemaker_inference/decoder.py
6 2 2
def _adapt_to_mms_format()
in src/sagemaker_inference/model_server.py
19 2 1