facebookresearch / nevergrad
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 1,332 units with 10,402 lines of code in units (62.7% of code).
    • 0 very complex units (0 lines of code)
    • 6 complex units (499 lines of code)
    • 52 medium complex units (1,794 lines of code)
    • 113 simple units (1,929 lines of code)
    • 1,161 very simple units (6,180 lines of code)
0% | 4% | 17% | 18% | 59%
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% | 4% | 17% | 18% | 59%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
nevergrad/optimization0% | 10% | 19% | 16% | 52%
nevergrad/benchmark0% | 4% | 16% | 33% | 46%
nevergrad/functions/games0% | 32% | 22% | 8% | 36%
nevergrad/functions/rocket0% | 0% | 98% | 0% | 1%
nevergrad/functions/powersystems0% | 0% | 79% | 0% | 20%
nevergrad/parametrization0% | 0% | 7% | 13% | 78%
nevergrad/optimization/multiobjective0% | 0% | 27% | 22% | 49%
nevergrad/functions/ml0% | 0% | 78% | 0% | 21%
nevergrad/functions/pyomo0% | 0% | 62% | 17% | 20%
nevergrad/functions/rl0% | 0% | 21% | 8% | 69%
nevergrad/functions/gym0% | 0% | 8% | 37% | 54%
nevergrad/functions0% | 0% | 3% | 6% | 89%
nevergrad/functions/mlda0% | 0% | 0% | 36% | 63%
nevergrad/common0% | 0% | 0% | 18% | 81%
nevergrad/functions/images0% | 0% | 0% | 13% | 86%
nevergrad/functions/control0% | 0% | 0% | 28% | 71%
nevergrad/functions/photonics0% | 0% | 0% | 0% | 100%
nevergrad/functions/arcoating0% | 0% | 0% | 0% | 100%
nevergrad/ops0% | 0% | 0% | 0% | 100%
nevergrad/functions/olympussurfaces0% | 0% | 0% | 0% | 100%
nevergrad/functions/causaldiscovery0% | 0% | 0% | 0% | 100%
nevergrad/functions/iohprofiler0% | 0% | 0% | 0% | 100%
nevergrad/functions/stsp0% | 0% | 0% | 0% | 100%
nevergrad/functions/fishing0% | 0% | 0% | 0% | 100%
nevergrad/functions/unitcommitment0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
nevergrad/functions/mixsimulator0% | 0% | 0% | 0% | 100%
nevergrad/benchmark/additional0% | 0% | 0% | 0% | 100%
nevergrad/functions/multiobjective0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _select_optimizer_cls()
in nevergrad/optimization/optimizerlib.py
80 45 1
def yawidebbob()
in nevergrad/benchmark/experiments.py
96 41 1
def _select_optimizer_cls()
in nevergrad/optimization/optimizerlib.py
71 39 1
def _internal_ask_candidate()
in nevergrad/optimization/optimizerlib.py
110 29 1
def flip_play_game_nosym()
in nevergrad/functions/games/game.py
84 27 3
def tell()
in nevergrad/optimization/base.py
58 26 3
def rocket()
in nevergrad/functions/rocket/rocket.py
168 25 1
def _select_optimizer_cls()
in nevergrad/optimization/optimizerlib.py
33 24 1
def _select_optimizer_cls()
in nevergrad/optimization/optimizerlib.py
38 24 1
def ask()
in nevergrad/optimization/base.py
46 20 1
def step()
in nevergrad/functions/rl/envs.py
28 20 3
def _select_optimizer_cls()
in nevergrad/optimization/optimizerlib.py
30 19 1
def war_play_game()
in nevergrad/functions/games/game.py
42 19 4
def _internal_ask_candidate()
in nevergrad/optimization/differentialevolution.py
49 18 1
def __call__()
in nevergrad/optimization/callbacks.py
42 18 4
def _get_search_space()
in nevergrad/optimization/externalbo.py
44 18 2
def _update_archive_and_bests()
in nevergrad/optimization/base.py
27 18 3
def accumulate_distance_per_objective()
in nevergrad/optimization/multiobjective/nsga2.py
39 18 3
def _internal_ask_candidate()
in nevergrad/optimization/optimizerlib.py
25 16 1
def _internal_tell_candidate()
in nevergrad/optimization/optimizerlib.py
53 16 3