facebookresearch / ScaDiver
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 216 units with 2,893 lines of code in units (56.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 12 medium complex units (794 lines of code)
    • 25 simple units (661 lines of code)
    • 179 very simple units (1,438 lines of code)
0% | 0% | 27% | 22% | 49%
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% | 27% | 22% | 49%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ROOT0% | 0% | 29% | 21% | 48%
bullet0% | 0% | 18% | 29% | 52%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def create()
in env_humanoid_imitation.py
81 23 1
def actuate()
in sim_agent.py
117 21 4
def __init__()
in env_humanoid_base.py
120 17 2
def get_task_error()
in env_humanoid_imitation.py
70 15 5
def render_model()
in bullet/bullet_render.py
47 15 15
def step()
in env_humanoid_base.py
52 14 2
def compute_reward()
in env_humanoid_base.py
41 13 3
def __init__()
in sim_agent.py
83 13 11
def _state_body()
in env_humanoid_base.py
50 12 9
def load_motions()
in env_humanoid_imitation.py
38 11 4
def render_joint()
in bullet/bullet_render.py
57 11 2
def extra_keyboard_callback()
in rllib_env_imitation.py
38 11 2
def add_noise_to_pose_vel()
in env_humanoid_tracking.py
46 10 5
def set_pose()
in sim_agent.py
45 10 3
def compute_target_pose()
in env_humanoid_base.py
38 9 3
16 9 2
def render()
in env_humanoid_tracking.py
54 9 3
def get_link_pQvw()
in bullet/bullet_utils.py
23 9 3
def from_string()
in sim_agent.py
9 8 2
def render()
in env_humanoid_base.py
41 7 2