awslabs / speech-representations
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 32 units with 428 lines of code in units (80.8% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (61 lines of code)
    • 4 medium size units (134 lines of code)
    • 9 small units (132 lines of code)
    • 18 very small units (101 lines of code)
0% | 14% | 31% | 30% | 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% | 14% | 31% | 30% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/speech_reps0% | 26% | 36% | 30% | 6%
src/speech_reps/models0% | 0% | 24% | 31% | 43%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _file_to_feats()
in src/speech_reps/featurize.py
61 6 2
def _file_to_feats()
in src/speech_reps/featurize.py
43 5 2
def _file_to_feats()
in src/speech_reps/featurize.py
43 5 2
def forward()
in src/speech_reps/models/decoar.py
26 3 3
def __init__()
in src/speech_reps/models/bertphone.py
22 2 18
def __init__()
in src/speech_reps/models/bertphone.py
20 3 5
def __init__()
in src/speech_reps/models/bertphone.py
19 2 15
def main()
in src/speech_reps/cmds.py
19 3 0
def factory()
in src/speech_reps/featurize.py
16 7 2
def populate_parser()
in src/speech_reps/featurize.py
12 1 2
def __init__()
in src/speech_reps/featurize.py
12 3 3
def __init__()
in src/speech_reps/featurize.py
12 3 3
def __init__()
in src/speech_reps/models/bertphone.py
11 2 11
def forward()
in src/speech_reps/models/decoar2.py
11 3 3
def __init__()
in src/speech_reps/models/decoar.py
10 1 1
def __init__()
in src/speech_reps/featurize.py
9 2 3
def __init__()
in src/speech_reps/models/wav2vec.py
8 1 2
def __init__()
in src/speech_reps/models/wav2vec2.py
8 1 2
def __init__()
in src/speech_reps/models/decoar2.py
8 2 1
def forward()
in src/speech_reps/models/wav2vec.py
7 2 2