facebookresearch / deep_bisim4control
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 533 units with 4,760 lines of code in units (76.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 9 medium complex units (672 lines of code)
    • 20 simple units (626 lines of code)
    • 504 very simple units (3,462 lines of code)
0% | 0% | 14% | 13% | 72%
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% | 14% | 13% | 72%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
CARLA_0.9.8/PythonAPI0% | 0% | 48% | 15% | 35%
CARLA_0.9.6/PythonAPI0% | 0% | 48% | 6% | 45%
ROOT0% | 0% | 11% | 18% | 69%
dmc2gym0% | 0% | 16% | 3% | 79%
local_dm_control_suite/utils0% | 0% | 20% | 50% | 28%
local_dm_control_suite0% | 0% | 0% | 8% | 91%
distractors0% | 0% | 0% | 42% | 57%
local_dm_control_suite/wrappers0% | 0% | 0% | 41% | 58%
agent0% | 0% | 0% | 4% | 95%
local_dm_control_suite/common0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def _simulator_step()
in CARLA_0.9.8/PythonAPI/carla/agents/navigation/carla_env.py
97 25 3
def main()
in train.py
115 22 0
def _simulator_step()
in CARLA_0.9.6/PythonAPI/carla/agents/navigation/carla_env.py
98 14 3
def build_arr()
in dmc2gym/natural_imgsource.py
35 14 1
def reset_other_vehicles()
in CARLA_0.9.8/PythonAPI/carla/agents/navigation/carla_env.py
40 12 1
def __init__()
in CARLA_0.9.6/PythonAPI/carla/agents/navigation/carla_env.py
110 12 10
def reset_other_vehicles()
in CARLA_0.9.6/PythonAPI/carla/agents/navigation/carla_env.py
35 12 1
def parse()
in local_dm_control_suite/utils/parse_amc.py
33 12 1
def __init__()
in CARLA_0.9.8/PythonAPI/carla/agents/navigation/carla_env.py
109 11 10
def dist_from_center_lane()
in CARLA_0.9.8/PythonAPI/carla/agents/navigation/carla_env.py
47 10 2
def run_step()
in CARLA_0.9.8/PythonAPI/carla/agents/navigation/carla_env.py
23 10 2
def run_step()
in CARLA_0.9.6/PythonAPI/carla/agents/navigation/carla_env.py
23 10 2
def randomize_limited_and_rotational_joints()
in local_dm_control_suite/utils/randomizers.py
28 10 2
def convert()
in local_dm_control_suite/utils/parse_amc.py
37 9 3
def update()
in agent/baseline_agent.py
26 8 4
def evaluate()
in train.py
50 8 9
def make_model()
in local_dm_control_suite/quadruped.py
24 8 4
def __init__()
in local_dm_control_suite/wrappers/pixels.py
31 8 5
def _make_model()
in local_dm_control_suite/lqr.py
35 8 5
def __init__()
in local_dm_control_suite/utils/parse_amc.py
16 8 3