aws / sagemaker-rl-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 176 units with 1,463 lines of code in units (52.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (67 lines of code)
    • 14 medium size units (385 lines of code)
    • 30 small units (434 lines of code)
    • 131 very small units (577 lines of code)
0% | 4% | 26% | 29% | 39%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 4% | 26% | 29% | 39%
c0% | 0% | 0% | 0% | 100%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/vw-serving/src0% | 4% | 26% | 29% | 39%
lib0% | 0% | 0% | 0% | 100%
src/vw-serving0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def invocations()
in src/vw-serving/src/vw_serving/serve.py
67 13 0
def pretty_validation_message()
in src/vw-serving/src/vw_serving/sagemaker/integration.py
36 6 1
def serve()
in src/vw-serving/src/vw_serving/model_manager.py
34 7 1
def _score_json()
in src/vw-serving/src/vw_serving/serve.py
33 5 3
def setup_logging()
in src/vw-serving/src/vw_serving/sagemaker/integration.py
33 3 2
def get_configuration()
in src/vw-serving/src/vw_serving/sagemaker/integration.py
29 4 2
def _dict_to_item()
in src/vw-serving/src/vw_serving/dynamodb_client_wrapper.py
27 10 1
def convert_to_customer_data_errors()
in src/vw-serving/src/vw_serving/sagemaker/exceptions.py
27 7 3
def get_num_gpus()
in src/vw-serving/src/vw_serving/sagemaker/gpu.py
26 8 2
def _load_pre_worker_entry_points()
in src/vw-serving/src/vw_serving/serve.py
25 8 1
def initialize_path_constants()
in src/vw-serving/src/vw_serving/sagemaker/integration.py
25 1 0
def _item_to_dict_helper()
in src/vw-serving/src/vw_serving/dynamodb_client_wrapper.py
23 10 1
def _query_num_gpus()
in src/vw-serving/src/vw_serving/sagemaker/gpu.py
23 8 0
def load_vars()
in src/vw-serving/src/vw_serving/serve.py
22 9 1
def __init__()
in src/vw-serving/src/vw_serving/firehose_producer.py
22 3 7
def _download_and_extract_model_tar_gz()
in src/vw-serving/src/vw_serving/model_manager.py
19 3 2
def _setup_boto_clients()
in src/vw-serving/src/vw_serving/model_manager.py
18 3 1
def _post_worker_init()
in src/vw-serving/src/vw_serving/serve.py
18 5 1
def __init__()
in src/vw-serving/src/vw_serving/vw_model.py
18 7 5
def get_list()
in src/vw-serving/src/vw_serving/sagemaker/config/config_helper.py
18 6 4