facebookresearch / av_hubert
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 215 units with 2,769 lines of code in units (34.5% of code).
    • 1 very long units (141 lines of code)
    • 8 long units (482 lines of code)
    • 28 medium size units (867 lines of code)
    • 43 small units (638 lines of code)
    • 135 very small units (641 lines of code)
5% | 17% | 31% | 23% | 23%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py5% | 17% | 31% | 23% | 23%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
avhubert8% | 14% | 29% | 19% | 28%
avhubert/preparation0% | 23% | 42% | 19% | 15%
avhubert/clustering0% | 20% | 18% | 45% | 15%
avhubert/misc0% | 0% | 0% | 100% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def _main()
in avhubert/infer_s2s.py
141 27 2
def main()
in avhubert/clustering/submit_cluster.py
74 8 0
def forward()
in avhubert/hubert_criterion.py
64 20 5
def make_short_manifest()
in avhubert/preparation/lrs3_prepare.py
63 17 2
def main()
in avhubert/preparation/lrs3_manifest.py
60 15 0
def __init__()
in avhubert/hubert_asr.py
58 8 3
def build_model()
in avhubert/hubert_asr.py
58 7 3
def main()
in avhubert/preparation/lrs3_noise.py
54 10 0
def collater()
in avhubert/hubert_dataset.py
51 20 2
def apply_input_mask()
in avhubert/hubert.py
50 11 4
def load_dataset()
in avhubert/hubert_pretraining.py
46 10 3
def trim_video_frame()
in avhubert/preparation/lrs3_prepare.py
41 9 6
def crop_patch()
in avhubert/preparation/align_mouth.py
40 7 10
def make_musan_tsv()
in avhubert/preparation/noise_manifest.py
40 14 2
def apply_feature_mask()
in avhubert/hubert.py
39 4 4
def extract_finetune()
in avhubert/hubert.py
39 14 6
def load_audio_visual()
in avhubert/hubert_dataset.py
38 12 7
def main()
in avhubert/preparation/vox_manifest.py
36 9 0
def trim_audio()
in avhubert/preparation/lrs3_prepare.py
35 7 6
def detect_face_landmarks()
in avhubert/preparation/detect_landmark.py
35 8 7