facebookresearch / BinauralSpeechSynthesis
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 70 units with 716 lines of code in units (81.7% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 8 medium size units (202 lines of code)
    • 18 small units (264 lines of code)
    • 44 very small units (250 lines of code)
0% | 0% | 28% | 36% | 34%
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% | 28% | 36% | 34%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 25% | 36% | 37%
ROOT0% | 0% | 64% | 35% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
31 6 3
def __init__()
in src/hyperconv.py
29 2 6
def train_iteration()
in src/trainer.py
28 1 2
def __init__()
in src/utils.py
27 2 7
def __init__()
in src/dataset.py
23 7 4
def __init__()
in src/trainer.py
22 2 4
def forward()
in src/hyperconv.py
21 4 3
def __init__()
in src/hyperconv.py
21 2 6
def update_lr()
in src/utils.py
19 7 2
def train()
in src/trainer.py
19 9 1
def __init__()
in src/models.py
18 3 9
def forward()
in src/models.py
18 3 3
def __init__()
in src/utils.py
18 2 8
def compute_metrics()
in evaluate.py
17 1 2
def _loss()
in src/losses.py
17 2 3
def forward()
in src/hyperconv.py
15 3 3
def save()
in src/utils.py
15 4 3
def forward()
in src/warping.py
13 2 3
def __getitem__()
in src/dataset.py
13 1 2
def _transmitter_mouth()
in src/models.py
12 3 2