aws-samples / sagemaker-end-to-end-distributed-tensorflow2
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 13 units with 211 lines of code in units (77.3% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (77 lines of code)
    • 2 medium size units (57 lines of code)
    • 3 small units (42 lines of code)
    • 7 very small units (35 lines of code)
0% | 36% | 27% | 19% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 36% | 27% | 19% | 16%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
training0% | 44% | 18% | 24% | 12%
inference0% | 0% | 64% | 0% | 35%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
def main()
in source_directory/training/training_script.py
77 12 1
def load_dataset()
in source_directory/training/training_script.py
32 10 3
def _process_input()
in source_directory/inference/inference.py
25 8 2
def create_model()
in source_directory/training/training_script.py
14 2 0
def get_files_for_processor()
in source_directory/training/training_script.py
14 8 1
def _dataset_parser()
in source_directory/training/training_script.py
14 4 1
def image_augmentation()
in source_directory/training/training_script.py
10 1 2
def _process_output()
in source_directory/inference/inference.py
7 2 2
def handler()
in source_directory/inference/inference.py
5 1 2
def save_model()
in source_directory/training/training_script.py
5 1 2
def __init__()
in source_directory/training/training_script.py
4 1 3
def _return_error()
in source_directory/inference/inference.py
2 1 2
def on_epoch_end()
in source_directory/training/training_script.py
2 1 3