aws / sagemaker-experiments
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 147 units with 976 lines of code in units (59.2% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 5 medium size units (122 lines of code)
    • 19 small units (258 lines of code)
    • 123 very small units (596 lines of code)
0% | 0% | 12% | 26% | 61%
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% | 12% | 26% | 61%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/smexperiments0% | 0% | 14% | 25% | 59%
scripts0% | 0% | 0% | 31% | 68%
ROOT0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def delete_all()
in src/smexperiments/experiment.py
31 7 2
def delete_all()
in src/smexperiments/trial.py
24 6 2
def get_or_create_default_bucket()
in src/smexperiments/_utils.py
23 8 2
def __init__()
in src/smexperiments/metrics.py
22 7 5
def delete()
in src/smexperiments/trial_component.py
22 7 2
def log_table()
in src/smexperiments/tracker.py
18 9 5
def __init__()
in src/smexperiments/api_types.py
18 1 0
def log_metric()
in src/smexperiments/metrics.py
17 4 5
def __init__()
in src/smexperiments/api_types.py
17 1 0
def from_boto()
in src/smexperiments/_boto_functions.py
17 10 3
def get_trial_component()
in src/smexperiments/_environment.py
16 3 2
def to_boto()
in src/smexperiments/_boto_functions.py
14 15 3
def create()
in src/smexperiments/trial.py
13 4 6
def release()
in scripts/release.py
13 2 0
def add_trial_component()
in src/smexperiments/trial.py
12 4 2
def remove_trial_component()
in src/smexperiments/trial.py
12 4 2
def list()
in src/smexperiments/trial_component.py
12 1 0
def convert_df_type_to_simple_type()
in src/smexperiments/tracker.py
12 3 2
def create_release()
in scripts/release_manager.py
12 1 1
def load()
in src/smexperiments/_environment.py
11 3 3