aws / sagemaker-tensorflow-serving-container
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 84 units with 1,047 lines of code in units (87.8% of code).
    • 0 very long units (0 lines of code)
    • 2 long units (141 lines of code)
    • 11 medium size units (340 lines of code)
    • 14 small units (220 lines of code)
    • 57 very small units (346 lines of code)
0% | 13% | 32% | 21% | 33%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 16% | 32% | 20% | 30%
js0% | 0% | 33% | 23% | 43%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
docker/build_artifacts/sagemaker0% | 14% | 34% | 20% | 31%
docker/build_artifacts0% | 0% | 0% | 27% | 72%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _handle_load_model_post()
in docker/build_artifacts/sagemaker/python_service.py
81 12 3
def __init__()
in docker/build_artifacts/sagemaker/serve.py
60 13 1
def _setup_gunicorn()
in docker/build_artifacts/sagemaker/serve.py
42 9 1
def create_batching_config()
in docker/build_artifacts/sagemaker/tfs_utils.py
40 7 1
def _handle_invocation_post()
in docker/build_artifacts/sagemaker/python_service.py
38 6 4
def on_get()
in docker/build_artifacts/sagemaker/python_service.py
37 6 4
function csv_request()
in docker/build_artifacts/sagemaker/tensorflow-serving.js
33 7 1
def on_delete()
in docker/build_artifacts/sagemaker/python_service.py
28 3 4
def _create_tfs_config()
in docker/build_artifacts/sagemaker/serve.py
28 6 1
function parse_custom_attributes()
in docker/build_artifacts/sagemaker/tensorflow-serving.js
27 7 1
def __init__()
in docker/build_artifacts/sagemaker/python_service.py
23 5 1
def start()
in docker/build_artifacts/sagemaker/serve.py
23 4 1
def wait_for_model()
in docker/build_artifacts/sagemaker/tfs_utils.py
21 6 4
def tfs_command()
in docker/build_artifacts/sagemaker/tfs_utils.py
20 1 9
def _stop()
in docker/build_artifacts/sagemaker/serve.py
19 6 2
def _monitor()
in docker/build_artifacts/sagemaker/serve.py
19 8 1
function json_lines_request()
in docker/build_artifacts/sagemaker/tensorflow-serving.js
18 6 2
def _create_nginx_config()
in docker/build_artifacts/sagemaker/serve.py
17 3 1
def parse_request()
in docker/build_artifacts/sagemaker/tfs_utils.py
17 4 6
def _download_scripts()
in docker/build_artifacts/sagemaker/serve.py
16 5 3