amazon-research / gfst-nmt
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 18 units with 209 lines of code in units (0.1% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 3 medium size units (92 lines of code)
    • 3 small units (41 lines of code)
    • 12 very small units (76 lines of code)
0% | 0% | 44% | 19% | 36%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 44% | 19% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src0% | 0% | 44% | 19% | 36%
Alternative Visuals
Longest Units
Top 18 longest units
Unit# linesMcCabe index# params
def main()
in src/target_filter.py
39 9 0
def main()
in src/source_filter.py
32 14 0
def _get_gender_dict()
in src/morphological_filtering.py
21 14 0
def target_filter()
in src/morphological_filtering.py
16 6 6
def _get_gender_per_word()
in src/morphological_filtering.py
14 6 2
def _get_gender()
in src/source_filter.py
11 7 1
def _get_gender_per_word()
in src/morphological_filtering.py
10 3 2
def _get_gender_per_word()
in src/morphological_filtering.py
10 3 2
def _matches_gender()
in src/morphological_filtering.py
9 4 3
def __init__()
in src/morphological_filtering.py
9 1 2
def _get_morphology_dict()
in src/morphological_filtering.py
8 4 1
def __init__()
in src/morphological_filtering.py
7 1 1
def _get_gender_per_word()
in src/morphological_filtering.py
6 2 2
def __init__()
in src/morphological_filtering.py
5 1 1
def __init__()
in src/morphological_filtering.py
4 1 1
def __init__()
in src/morphological_filtering.py
3 1 1
def _get_words()
in src/source_filter.py
3 2 1
def _get_gender_per_word()
in src/morphological_filtering.py
2 1 2