facebookresearch / gala
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 114 units with 1,151 lines of code in units (90.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (113 lines of code)
    • 10 simple units (223 lines of code)
    • 100 very simple units (815 lines of code)
0% | 0% | 9% | 19% | 70%
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% | 19% | 70%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
gala0% | 0% | 11% | 17% | 71%
ROOT0% | 0% | 0% | 30% | 69%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _make_graph()
in gala/graph_manager.py
24 17 1
def _make_graph()
in gala/graph_manager.py
20 16 1
def aggregate_message()
in gala/gpu_gossip_buffer.py
35 14 3
def make_env()
in gala/envs.py
34 12 7
def write_message()
in gala/gpu_gossip_buffer.py
30 10 4
def __init__()
in gala/model.py
35 9 6
def get_peers()
in gala/graph_manager.py
12 8 2
def compute_returns()
in gala/storage.py
40 8 6
29 8 3
def make_vec_envs()
in gala/envs.py
24 7 11
def _make_graph()
in gala/graph_manager.py
14 7 1
def _make_graph()
in gala/graph_manager.py
12 6 1
def _make_graph()
in gala/graph_manager.py
9 6 1
def train()
in main.py
18 6 1
def __init__()
in gala/gpu_gossip_buffer.py
18 5 8
def __init__()
in gala/model.py
11 5 4
def _obfilt()
in gala/envs.py
10 4 3
def get_render_func()
in gala/utils.py
8 4 1
def _make_graph()
in gala/graph_manager.py
8 4 1
def __init__()
in gala/storage.py
20 4 6