facebookresearch / bipedal-skills
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 101 units with 1,458 lines of code in units (69.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (74 lines of code)
    • 9 simple units (162 lines of code)
    • 90 very simple units (1,222 lines of code)
0% | 0% | 5% | 11% | 83%
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% | 5% | 11% | 83%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
bisk/tasks0% | 0% | 3% | 10% | 85%
bisk/features0% | 0% | 23% | 28% | 47%
bisk0% | 0% | 0% | 5% | 94%
exp0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def sensor_names()
in bisk/features/base.py
36 16 1
def step()
in bisk/tasks/goalwall.py
38 11 2
def fell_over()
in bisk/tasks/stairs.py
15 10 1
def fell_over()
in bisk/single_robot.py
15 10 1
def step()
in bisk/tasks/limbo.py
20 8 2
def on_step_single_frame()
in bisk/tasks/goalwall.py
16 8 1
def on_step_single_frame()
in bisk/tasks/hurdleslimbo.py
16 7 1
def step()
in bisk/tasks/hurdleslimbo.py
20 7 2
def on_step_single_frame()
in bisk/tasks/limbo.py
16 7 1
def qpos_names()
in bisk/features/base.py
23 7 1
def qvel_names()
in bisk/features/base.py
21 7 1
def step()
in bisk/tasks/polebalance.py
28 5 2
def init_sim()
in bisk/tasks/stairs.py
48 5 3
def reset_state()
in bisk/tasks/gaps.py
43 5 1
def feature_names()
in bisk/features/joints.py
12 5 1
def init_sim()
in bisk/tasks/hurdleslimbo.py
17 4 3
def reset_state()
in bisk/tasks/hurdleslimbo.py
41 4 1
def init_sim()
in bisk/tasks/polebalance.py
94 4 3
def reset_state()
in bisk/tasks/stairs.py
24 4 1
def on_step_single_frame()
in bisk/tasks/gaps.py
7 4 1