aws-samples / sagemaker-cross-validation-pipeline
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 11 units with 207 lines of code in units (68.5% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (71 lines of code)
    • 3 medium size units (82 lines of code)
    • 3 small units (37 lines of code)
    • 4 very small units (17 lines of code)
0% | 34% | 39% | 17% | 8%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 34% | 39% | 17% | 8%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
code0% | 34% | 39% | 17% | 8%
Alternative Visuals
Longest Units
Top 11 longest units
Unit# linesMcCabe index# params
def train()
in code/cross_validation_with_hpo.py
71 5 15
def train()
in code/cv.py
29 2 0
def fit_model()
in code/cv.py
27 1 8
def train()
in code/scikit_learn_iris.py
26 8 2
def save_kfold_datasets()
in code/preprocessing.py
13 4 3
13 5 2
def evaluation()
in code/cv.py
11 4 2
def evaluate()
in code/scikit_learn_iris.py
6 2 2
def save_all_datasets()
in code/preprocessing.py
4 1 2
def process()
in code/preprocessing.py
4 1 1
def model_fn()
in code/scikit_learn_iris.py
3 1 1