facebookresearch / alebo
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 87 units with 1,611 lines of code in units (62.6% of code).
    • 2 very long units (245 lines of code)
    • 0 long units (0 lines of code)
    • 31 medium size units (865 lines of code)
    • 23 small units (341 lines of code)
    • 31 very small units (160 lines of code)
15% | 0% | 53% | 21% | 9%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py15% | 0% | 53% | 21% | 9%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
figs25% | 0% | 54% | 9% | 10%
benchmarks0% | 0% | 51% | 38% | 9%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def make_fig_5()
in figs/fig_5.py
124 20 0
def make_fig_S7()
in figs/fig_S7.py
121 12 0
def make_fig_1()
in figs/fig_1.py
48 1 0
def make_fig_S2()
in figs/fig_S2.py
44 1 0
def make_fig_S9()
in figs/fig_S9.py
36 3 0
35 2 0
def make_fig_3()
in figs/fig_3.py
35 1 0
def make_fig_S6()
in figs/fig_S6.py
34 6 0
def compile_hartmann6()
in benchmarks/compile_benchmark_results.py
34 14 2
def fmin_smac_nopynisher()
in benchmarks/run_smac_benchmarks.py
32 3 5
def run_hartmann6_benchmarks()
in benchmarks/run_ax_benchmarks.py
31 8 3
def make_fig_S5()
in figs/fig_S5.py
30 9 0
def make_fig_4()
in figs/fig_4.py
30 9 0
def make_fig_S8()
in figs/fig_S8.py
30 3 0
def A_contains_xstar()
in figs/fig_4.py
27 3 3
def run_hartmann6_benchmarks()
in benchmarks/run_ebo_benchmarks.py
27 6 2
def make_fig_2()
in figs/fig_2.py
26 9 0
def compile_branin_gramacy_100()
in benchmarks/compile_benchmark_results.py
26 5 0
def run_branin_benchmarks()
in benchmarks/run_ebo_benchmarks.py
26 4 1
def run_hartmann6_benchmarks()
in benchmarks/run_cmaes_benchmarks.py
25 7 3