facebookresearch / WavAugment
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 22 units with 131 lines of code in units (74.9% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (39 lines of code)
    • 2 small units (24 lines of code)
    • 19 very small units (68 lines of code)
0% | 0% | 29% | 18% | 51%
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% | 29% | 18% | 51%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
augment0% | 0% | 29% | 18% | 51%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def apply()
in augment/effects.py
39 17 8
def instantiate()
in augment/effects.py
12 5 1
def _apply_sox_effects()
in augment/effects.py
12 3 4
def __call__()
in augment/effects.py
10 2 4
def __call__()
in augment/effects.py
6 1 4
def __init__()
in augment/effects.py
5 1 3
def __call__()
in augment/effects.py
5 2 4
def _append_effect_to_chain()
in augment/effects.py
4 1 3
def additive_noise()
in augment/effects.py
4 1 3
def __init__()
in augment/effects.py
4 2 3
def add_effect()
in augment/effects.py
3 2 3
def __init__()
in augment/effects.py
3 2 3
def __init__()
in augment/effects.py
3 1 2
def time_dropout()
in augment/effects.py
3 1 3
def clip()
in augment/effects.py
3 1 3
def create_method()
in augment/effects.py
3 1 1
def shutdown_sox()
in augment/effects.py
2 1 0
def __init__()
in augment/effects.py
2 1 1
def apply_flow_effects()
in augment/effects.py
2 1 4
def clear()
in augment/effects.py
2 1 1