facebookresearch / libri-light
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 284 units with 3,507 lines of code in units (73.4% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (384 lines of code)
    • 44 medium size units (1,282 lines of code)
    • 68 small units (964 lines of code)
    • 166 very small units (877 lines of code)
0% | 10% | 36% | 27% | 25%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 11% | 36% | 27% | 25%
pyx0% | 0% | 0% | 84% | 15%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
eval0% | 31% | 27% | 19% | 21%
data_preparation0% | 20% | 27% | 34% | 17%
data_preparation/split_librilight0% | 14% | 35% | 33% | 16%
data_preparation/metadata_completion0% | 0% | 55% | 16% | 28%
eval/ABX_src0% | 0% | 45% | 25% | 29%
eval/PER_src0% | 0% | 52% | 31% | 15%
eval/WER_src0% | 0% | 44% | 28% | 26%
data_preparation/text_retrieval0% | 0% | 21% | 32% | 45%
data_preparation/rebuild_limited_train0% | 0% | 14% | 51% | 34%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in eval/eval_WER.py
82 10 1
def train()
in eval/eval_PER.py
70 12 1
def ABX()
in eval/eval_ABX.py
62 4 9
def import_page()
in data_preparation/download_librivox.py
60 6 5
def process_dir()
in data_preparation/split_librilight/puts_json.py
56 12 8
def main()
in data_preparation/complete_metadata.py
54 8 1
def clean_all_text_data()
in data_preparation/metadata_completion/text_cleaner.py
49 7 3
def per_step()
in eval/PER_src/seq_alignment.py
47 6 4
def eval_wer()
in eval/eval_WER.py
44 7 5
def beam_search()
in eval/PER_src/seq_alignment.py
40 15 3
def get_bartheleby_data()
in data_preparation/text_retrieval/bartleby.py
38 9 1
def findAllSeqs()
in data_preparation/make_vad_inputs.py
37 13 3
def loadSeqs()
in eval/PER_src/simplePhonemLearner.py
37 3 1
def loadFromFileData()
in eval/ABX_src/abx_iterators.py
36 7 5
def parse_args()
in eval/eval_ABX.py
34 1 1
def main()
in eval/eval_ABX.py
34 6 1
def calculate_snr()
in data_preparation/calculate_snr.py
33 7 6
def subselect()
in data_preparation/split_librilight/split.py
33 14 3
def get_speaker_data()
in data_preparation/metadata_completion/utilities.py
33 10 3
def load_item_file()
in eval/ABX_src/abx_iterators.py
33 7 1