facebookresearch / voxpopuli
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 99 units with 1,094 lines of code in units (52.9% of code).
    • 0 very long units (0 lines of code)
    • 4 long units (230 lines of code)
    • 9 medium size units (260 lines of code)
    • 19 small units (272 lines of code)
    • 67 very small units (332 lines of code)
0% | 21% | 23% | 24% | 30%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 21% | 23% | 24% | 30%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
voxpopuli0% | 38% | 28% | 23% | 9%
voxpopuli/segmentation0% | 11% | 20% | 22% | 45%
voxpopuli/text0% | 0% | 19% | 44% | 35%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in voxpopuli/segmentation/get_segment_pyannote_speaker.py
67 4 0
def main()
in voxpopuli/get_lm_data.py
55 15 1
def get()
in voxpopuli/get_s2s_data.py
55 12 1
def digit2text()
in voxpopuli/get_lm_data.py
53 21 2
def get()
in voxpopuli/get_asr_data.py
37 9 1
def merge_segments()
in voxpopuli/segmentation/run_pyannote_sd.py
36 10 2
def split_audio()
in voxpopuli/segmentation/get_segment_pyannote_speaker.py
33 6 2
def get_metadata()
in voxpopuli/get_unlabelled_data.py
32 14 2
def download()
in voxpopuli/download_audios.py
32 8 1
def get_all()
in voxpopuli/segmentation/get_segment_pyannote_speaker.py
24 4 1
def main()
in voxpopuli/segmentation/run_pyannote_sd.py
23 11 1
def get_args()
in voxpopuli/get_s2s_data.py
22 1 0
def load_word_align_file()
in voxpopuli/text/wer_tools.py
21 3 1
def get_align_index_path()
in voxpopuli/text/wer_tools.py
20 6 2
def load_from_tsv_gz()
in voxpopuli/get_lm_data.py
19 3 1
def processs_session()
in voxpopuli/segmentation/cut_with_align_files.py
18 2 2
def main()
in voxpopuli/segmentation/cut_from_labels.py
17 4 1
def remove_parentheses()
in voxpopuli/get_lm_data.py
16 11 1
def get()
in voxpopuli/get_unlabelled_data.py
16 3 1
def is_id_valid()
in voxpopuli/segmentation/__init__.py
15 9 1