facebookresearch / DoodlerGAN
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 157 units with 1,675 lines of code in units (67.8% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (268 lines of code)
    • 18 medium size units (579 lines of code)
    • 27 small units (377 lines of code)
    • 108 very small units (451 lines of code)
0% | 16% | 34% | 22% | 26%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 16% | 34% | 22% | 26%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 16% | 34% | 22% | 26%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def train()
in part_generator.py
97 22 1
63 24 7
def __init__()
in inception.py
55 6 6
def vector_to_raster()
in data_process.py
53 11 9
def __init__()
in part_generator.py
48 9 16
def __init__()
in part_selector.py
47 16 4
def generate_part()
in generate_creative_creatures.py
47 5 11
44 13 6
def generate_part()
in generate_creative_birds.py
43 8 11
def evaluate()
in part_selector.py
36 12 3
def train()
in part_selector.py
34 9 1
def __getitem__()
in part_generator.py
32 4 2
def evaluate()
in part_generator.py
29 4 5
def __init__()
in part_selector.py
27 5 12
def processed_part_to_raster()
in part_generator.py
26 7 8
def __getitem__()
in part_selector.py
26 3 2
26 7 8
25 4 5
def __init__()
in part_generator.py
24 8 4
def sample_partial_test()
in part_generator.py
22 4 2