facebookresearch / fews
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 27 units with 496 lines of code in units (90.0% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (54 lines of code)
    • 8 medium size units (263 lines of code)
    • 7 small units (105 lines of code)
    • 11 very small units (74 lines of code)
0% | 10% | 53% | 21% | 14%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 10% | 53% | 21% | 14%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 10% | 53% | 21% | 14%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def clean_text()
in data_parsing.py
54 2 2
def process_quotation()
in data_parsing.py
45 10 1
def process_page()
in data_parsing.py
45 9 1
def split_data()
in split_data.py
38 10 2
def main()
in data_parsing.py
29 5 1
def main()
in split_data.py
29 2 1
def post_processing()
in data_parsing.py
27 2 1
def process_language()
in data_parsing.py
26 2 2
def process_sense()
in data_parsing.py
24 2 3
def process_pos()
in data_parsing.py
19 4 3
18 1 1
def compress_lines()
in data_parsing.py
17 1 1
15 1 2
def process_gloss()
in data_parsing.py
13 3 1
12 1 2
11 1 1
def generate_sense()
in data_parsing.py
10 1 2
9 1 2
def filter_senses()
in split_data.py
8 2 2
def lcs()
in data_parsing.py
7 1 2