aws / sagemaker-inference-toolkit
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 54 units with 340 lines of code in units (58.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (84 lines of code)
    • 3 small units (50 lines of code)
    • 48 very small units (206 lines of code)
0% | 0% | 24% | 14% | 60%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 24% | 14% | 60%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/sagemaker_inference0% | 0% | 25% | 14% | 60%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def transform()
in src/sagemaker_inference/transformer.py
32 9 3
def _validate_user_module_and_set_functions()
in src/sagemaker_inference/transformer.py
26 10 1
def start_model_server()
in src/sagemaker_inference/model_server.py
26 4 1
def _adapt_to_mms_format()
in src/sagemaker_inference/model_server.py
19 2 1
def _generate_mms_config_properties()
in src/sagemaker_inference/model_server.py
19 4 0
def __init__()
in src/sagemaker_inference/environment.py
12 1 1
def __init__()
in src/sagemaker_inference/transformer.py
10 2 2
def _retrieve_mms_server_process()
in src/sagemaker_inference/model_server.py
10 5 0
def initialize()
in src/sagemaker_inference/default_handler_service.py
9 2 2
def _install_requirements()
in src/sagemaker_inference/model_server.py
8 2 0
def _add_sigterm_handler()
in src/sagemaker_inference/model_server.py
7 2 1
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 remove_crlf()
in src/sagemaker_inference/utils.py
6 2 1
def find_spec()
in src/sagemaker_inference/transformer.py
6 2 1
def handle_error()
in src/sagemaker_inference/transformer.py
6 1 3
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 _set_python_path()
in src/sagemaker_inference/model_server.py
6 2 0