facebookresearch / svoice
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 102 units with 1,365 lines of code in units (79.5% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (244 lines of code)
    • 13 medium size units (415 lines of code)
    • 29 small units (411 lines of code)
    • 56 very small units (295 lines of code)
0% | 17% | 30% | 30% | 21%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 17% | 30% | 30% | 21%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
svoice0% | 28% | 22% | 28% | 20%
ROOT0% | 71% | 0% | 20% | 8%
scripts0% | 0% | 74% | 8% | 17%
svoice/models0% | 0% | 35% | 42% | 21%
svoice/data0% | 0% | 23% | 43% | 33%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def evaluate_auto_select()
in svoice/evaluate_auto_select.py
85 13 1
def train()
in svoice/solver.py
54 16 1
def run()
in train.py
53 10 1
def evaluate()
in svoice/evaluate.py
52 9 4
def room_gen()
in scripts/make_dataset.py
50 5 3
def gen_scene()
in scripts/make_dataset.py
50 5 4
def separate()
in svoice/separate.py
38 8 3
def __init__()
in svoice/solver.py
33 6 5
def _run_one_epoch()
in svoice/solver.py
33 8 3
def cal_si_snr_with_pit()
in svoice/models/sisnr_loss.py
33 1 3
def forward()
in svoice/models/swave.py
29 6 2
def fetch_signals()
in scripts/make_dataset.py
29 4 2
def __init__()
in svoice/models/swave.py
27 3 9
def __exit__()
in svoice/executor.py
26 10 4
def start_ddp_workers()
in svoice/executor.py
23 4 0
def __init__()
in svoice/data/data.py
22 6 6
def __init__()
in svoice/data/data.py
22 5 5
def __init__()
in svoice/data/data.py
19 6 2
def __init__()
in svoice/models/swave.py
18 3 9
def overlap_and_add()
in svoice/utils.py
18 2 2