facebookresearch / Imppres
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 13 units with 124 lines of code in units (0.5% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 1 medium size units (40 lines of code)
    • 3 small units (39 lines of code)
    • 9 very small units (45 lines of code)
0% | 0% | 32% | 31% | 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% | 32% | 31% | 36%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
results0% | 0% | 32% | 31% | 36%
Alternative Visuals
Longest Units
Top 13 longest units
Unit# linesMcCabe index# params
def finely_summarize_data_to_table()
in results/summarize_presupposition_results.py
40 16 4
def filter_paradigm()
in results/summarize_presupposition_results.py
15 6 1
def split_into_paradigms()
in results/summarize_presupposition_results.py
13 4 1
def correct_prediction()
in results/summarize_presupposition_results.py
11 10 1
def accuracy()
in results/summarize_presupposition_results.py
9 3 1
def unify_results()
in results/summarize_presupposition_results.py
8 3 2
def save_csv()
in results/summarize_presupposition_results.py
6 3 2
def get_by_filter()
in results/summarize_presupposition_results.py
5 2 3
def filter_entire_dataset()
in results/summarize_presupposition_results.py
5 2 1
def get_controls()
in results/summarize_presupposition_results.py
3 1 1
def get_controls_contradictions()
in results/summarize_presupposition_results.py
3 2 1
def get_basic_prsp()
in results/summarize_presupposition_results.py
3 3 1
def aggregate_data()
in results/summarize_presupposition_results.py
3 2 2