aws-samples / amazon-sagemaker-data-quality-monitor-custom-preprocessing
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 21 units with 251 lines of code in units (85.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (56 lines of code)
    • 3 medium size units (94 lines of code)
    • 4 small units (56 lines of code)
    • 13 very small units (45 lines of code)
0% | 22% | 37% | 22% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 22% | 37% | 22% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 22% | 37% | 22% | 17%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def run_model_monitor_job_processor()
in src/monitoringjob_utils.py
56 3 11
def create_data_quality_monitor()
in src/demo_data_quality_model_monitor.py
43 2 1
def generate_artificial_traffic()
in src/artificial_traffic.py
27 6 6
def get_model_monitor_container_uri()
in src/monitoringjob_utils.py
24 1 1
def preprocess_handler()
in src/preprocessor.py
18 8 1
def __init__()
in src/demo_data_quality_model_monitor.py
16 1 12
def input_fn()
in src/inference.py
11 4 2
def predict_fn()
in src/inference.py
11 2 2
def output_fn()
in src/inference.py
10 5 2
def eval_test_indicator()
in src/preprocessor.py
5 2 1
def model_fn()
in src/inference.py
4 1 1
def write_to_file()
in src/preprocessor.py
3 1 2
def get_class_val()
in src/preprocessor.py
3 2 1
def __init__()
in src/artificial_traffic.py
3 1 2
def random_gaussian()
in src/artificial_traffic.py
3 1 2
def random_int()
in src/artificial_traffic.py
3 1 2
def get_file_name()
in src/monitoringjob_utils.py
3 1 1
def str_to_bool()
in src/preprocessor.py
2 1 1
def test_indicator_exist()
in src/preprocessor.py
2 2 1
def increment_id()
in src/artificial_traffic.py
2 1 1