aws-samples / aws-sagemaker-byoc-end2end
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 23 units with 307 lines of code in units (39.4% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (159 lines of code)
    • 2 small units (29 lines of code)
    • 16 very small units (119 lines of code)
0% | 0% | 51% | 9% | 38%
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% | 51% | 9% | 38%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
containers/serving/resources0% | 0% | 75% | 0% | 25%
containers/training/resources0% | 0% | 76% | 0% | 23%
containers/batch_transform/resources0% | 0% | 75% | 0% | 24%
scripts0% | 0% | 36% | 24% | 39%
processing0% | 0% | 0% | 29% | 70%
pipelines0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in containers/training/resources/train.py
46 4 0
def inference()
in containers/serving/resources/predict.py
35 3 0
def main()
in containers/batch_transform/resources/evaluate.py
28 1 0
def start_server()
in containers/serving/resources/serve.py
28 3 0
def delete_model()
in scripts/utils.py
22 1 4
def delete_endpoint()
in scripts/utils.py
15 1 3
def run_spark_job()
in processing/batch_ingest_sm_pyspark.py
14 3 0
def sigterm_handler()
in containers/serving/resources/serve.py
10 3 2
def ingest_to_feature_store()
in processing/batch_ingest_sm_pyspark.py
10 2 2
def read_imdb_split()
in containers/batch_transform/resources/evaluate.py
9 4 1
def read_imdb_split()
in containers/training/resources/train.py
9 4 1
def gen_train_val()
in processing/create_dataset.py
9 3 2
def delete_ecr()
in scripts/utils.py
9 1 1
def create_predictor()
in containers/serving/resources/predict.py
8 2 1
def model_quality_baseline()
in pipelines/byoc_pipeline.py
8 1 0
def parse_args()
in processing/batch_ingest_sm_pyspark.py
8 1 0
def delete_fg()
in scripts/utils.py
8 1 2
def dataset_step()
in pipelines/byoc_pipeline.py
7 1 0
def transform_row()
in processing/batch_ingest_sm_pyspark.py
7 2 1
def delete_s3()
in scripts/utils.py
7 1 2