awslabs / gluon-ts-tools
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 71 units with 520 lines of code in units (62.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 4 medium size units (104 lines of code)
    • 10 small units (162 lines of code)
    • 57 very small units (254 lines of code)
0% | 0% | 20% | 31% | 48%
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% | 20% | 31% | 48%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
runtool/runtool0% | 0% | 20% | 31% | 48%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def generate_job_json()
in runtool/runtool/experiments_converter.py
33 2 1
def apply_each()
in runtool/runtool/transformations.py
25 9 1
def apply_eval()
in runtool/runtool/transformations.py
24 9 2
def generate_job_name()
in runtool/runtool/experiments_converter.py
22 4 2
def recurse_eval()
in runtool/runtool/transformations.py
20 3 3
def recursive_apply_dict()
in runtool/runtool/recurse_config.py
20 8 2
def generate_tags()
in runtool/runtool/experiments_converter.py
19 2 1
def recursive_apply_list()
in runtool/runtool/recurse_config.py
19 6 2
def __mul__()
in runtool/runtool/datatypes.py
16 7 3
def apply_trial()
in runtool/runtool/transformations.py
15 8 2
def generate_run_configuration()
in runtool/runtool/experiments_converter.py
15 2 2
def generate_datasets()
in runtool/runtool/experiments_converter.py
13 2 1
def generate_sagemaker_overrides()
in runtool/runtool/experiments_converter.py
13 4 1
def from_nodes()
in runtool/runtool/datatypes.py
12 3 3
def update_nested_dict()
in runtool/runtool/utils.py
10 4 2
def apply_transformations()
in runtool/runtool/transformer.py
10 3 1
def apply_from()
in runtool/runtool/transformations.py
9 3 2
def generate_sagemaker_json()
in runtool/runtool/experiments_converter.py
9 1 0
def __init__()
in runtool/runtool/datatypes.py
9 4 2
def as_dict()
in runtool/runtool/datatypes.py
9 4 1