apple / vqg-multimodal-assistant
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 44 units with 1,056 lines of code in units (75.2% of code).
    • 0 very long units (0 lines of code)
    • 6 long units (407 lines of code)
    • 14 medium size units (396 lines of code)
    • 11 small units (176 lines of code)
    • 13 very small units (77 lines of code)
0% | 38% | 37% | 16% | 7%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 38% | 37% | 16% | 7%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
ROOT0% | 38% | 37% | 16% | 6%
commons_pkg0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def diverse_beam_search()
in question_generation_model.py
89 26 6
def beam_search()
in question_generation_model.py
78 23 5
def generate_batch()
in question_generation_model.py
69 6 6
64 19 1
def __init__()
in datasets.py
55 12 9
def greedy_search()
in question_generation_model.py
52 15 4
def train_model()
in question_generation_model.py
40 4 7
34 12 4
def test_model()
in question_generation_model.py
34 7 6
def build()
in bert_layer.py
33 15 2
def dissimilarity_grouping()
in question_generation_model.py
32 13 4
29 8 3
def load_test_data()
in datasets.py
29 7 1
def test_model_demo()
in question_generation_model.py
27 1 4
25 2 5
def build_keyword_model()
in question_generation_model.py
25 1 1
def build_elmo_model()
in question_generation_model.py
25 1 1
def load_data()
in datasets.py
21 4 2
def load_dev_data()
in datasets.py
21 4 2
def load_embeddings()
in question_generation_model.py
21 9 1