facebookresearch / aepsych
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 360 units with 3,452 lines of code in units (9.4% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (237 lines of code)
    • 15 simple units (504 lines of code)
    • 341 very simple units (2,711 lines of code)
0% | 0% | 6% | 14% | 78%
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% | 9% | 14% | 76%
cs0% | 0% | 0% | 15% | 84%
pyi0% | 0% | 0% | 0% | 100%
m0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
aepsych0% | 0% | 12% | 14% | 72%
pubs/owenetal0% | 0% | 24% | 27% | 47%
clients/unity0% | 0% | 0% | 15% | 84%
aepsych/generators0% | 0% | 0% | 29% | 70%
aepsych/benchmark0% | 0% | 0% | 9% | 90%
aepsych/database0% | 0% | 0% | 0% | 100%
aepsych/models0% | 0% | 0% | 0% | 100%
aepsych/acquisition0% | 0% | 0% | 0% | 100%
aepsych/factory0% | 0% | 0% | 0% | 100%
aepsych/means0% | 0% | 0% | 0% | 100%
clients/matlab0% | 0% | 0% | 0% | 100%
aepsych/kernels0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
42 12 2
def plot_acquisition_examples()
in pubs/owenetal/code/stratplots.py
108 12 3
def replay()
in aepsych/server.py
38 11 3
def start_server()
in aepsych/server.py
49 11 2
public override void OnInspectorGUI()
in clients/unity/Assets/Editor/DemoEditor.cs
67 9 0
def versioned_handler()
in aepsych/server.py
31 8 2
def gen()
in aepsych/generators/optimize_acqf_generator.py
42 8 3
void Update()
in clients/unity/Assets/Scripts/ShowKey.cs
33 7 0
def collate_benchmarks()
in aepsych/benchmark/pathos_benchmark.py
16 7 2
def serve()
in aepsych/server.py
20 7 1
def get_strats_from_replay()
in aepsych/server.py
21 7 3
def get_strat_from_replay()
in aepsych/server.py
22 7 3
def ensure_model_is_fresh()
in aepsych/strategy.py
15 7 1
def _get_acqf_options()
in aepsych/generators/base.py
26 7 3
IEnumerator RunExperiment()
in clients/unity/Assets/Scripts/StratSwitch_2DSingleDetection.cs
37 6 0
def make_benchmark_list()
in aepsych/benchmark/benchmark.py
11 6 2
def receive()
in aepsych/server.py
22 6 1
def handle_tell()
in aepsych/server.py
18 6 2
def plot_novel_lse_grids()
in pubs/owenetal/code/stratplots.py
123 6 3
private IEnumerator LogUserInput()
in clients/unity/Assets/Scripts/Ex2DSingleDetection.cs
15 5 0