facebookresearch / alebo
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 87 units with 1,611 lines of code in units (62.6% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (279 lines of code)
    • 12 simple units (315 lines of code)
    • 72 very simple units (1,017 lines of code)
0% | 0% | 17% | 19% | 63%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
py0% | 0% | 17% | 19% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
figs0% | 0% | 25% | 14% | 59%
benchmarks0% | 0% | 5% | 26% | 68%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def make_fig_5()
in figs/fig_5.py
124 20 0
def compile_hartmann6()
in benchmarks/compile_benchmark_results.py
34 14 2
def make_fig_S7()
in figs/fig_S7.py
121 12 0
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_2()
in figs/fig_2.py
26 9 0
21 8 0
def compile_nasbench()
in benchmarks/compile_benchmark_results.py
25 8 0
def run_hartmann6_benchmarks()
in benchmarks/run_ax_benchmarks.py
31 8 3
def evaluate_x()
in benchmarks/nasbench_evaluation.py
19 8 1
def run_hartmann6_benchmarks()
in benchmarks/run_cmaes_benchmarks.py
25 7 3
def run_hartmann6_benchmarks()
in benchmarks/run_smac_benchmarks.py
23 7 3
def run_hartmann6_benchmarks()
in benchmarks/run_turbo_benchmarks.py
24 7 3
def make_fig_S6()
in figs/fig_S6.py
34 6 0
def run_hartmann6_benchmarks()
in benchmarks/run_ebo_benchmarks.py
27 6 2
def hesbo_branin()
in figs/fig_S1.py
9 5 2
def table_S1_data()
in figs/table_S1.py
11 5 0
def run_simulation()
in figs/fig_S6.py
15 5 0
def compile_branin_gramacy_100()
in benchmarks/compile_benchmark_results.py
26 5 0
def run_simulation1()
in figs/fig_4.py
21 4 0