facebookresearch / denoiser
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 111 units with 1,412 lines of code in units (79.1% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (289 lines of code)
    • 16 medium size units (502 lines of code)
    • 21 small units (295 lines of code)
    • 69 very small units (326 lines of code)
0% | 20% | 35% | 20% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 20% | 35% | 20% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
denoiser0% | 21% | 33% | 20% | 23%
ROOT0% | 0% | 69% | 21% | 8%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in denoiser/live.py
71 12 0
def _separate_frame()
in denoiser/demucs.py
58 14 2
def __init__()
in denoiser/demucs.py
56 7 16
def feed()
in denoiser/demucs.py
53 11 2
def train()
in denoiser/solver.py
51 16 1
def run()
in train.py
48 11 1
def test()
in denoiser/demucs.py
41 4 0
def __init__()
in denoiser/solver.py
37 6 5
def evaluate()
in denoiser/evaluate.py
36 8 3
def _run_one_epoch()
in denoiser/solver.py
35 11 3
def forward()
in denoiser/demucs.py
35 9 2
def get_parser()
in denoiser/live.py
33 1 0
def __getitem__()
in denoiser/audio.py
33 13 2
def enhance()
in denoiser/enhance.py
32 10 3
def _reset()
in denoiser/solver.py
27 11 1
def __init__()
in denoiser/demucs.py
27 1 6
def match_dns()
in denoiser/data.py
25 5 2
def start_ddp_workers()
in denoiser/executor.py
25 5 1
def get_model()
in denoiser/pretrained.py
24 7 1
def __exit__()
in denoiser/executor.py
23 10 4