facebookresearch / pyrobot
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 606 units with 7,014 lines of code in units (43.9% of code).
    • 0 very complex units (0 lines of code)
    • 1 complex units (102 lines of code)
    • 16 medium complex units (1,144 lines of code)
    • 38 simple units (1,327 lines of code)
    • 551 very simple units (4,441 lines of code)
0% | 1% | 16% | 18% | 63%
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% | 1% | 10% | 18% | 69%
cpp0% | 0% | 44% | 22% | 32%
cc0% | 0% | 0% | 0% | 100%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
robots/LoCoBot/locobot_control0% | 5% | 35% | 19% | 39%
src/pyrobot/utils0% | 0% | 36% | 14% | 48%
src/pyrobot/locobot0% | 0% | 6% | 23% | 69%
robots/LoCoBot/locobot_calibration0% | 0% | 19% | 11% | 68%
src/pyrobot0% | 0% | 0% | 34% | 65%
src/pyrobot/habitat0% | 0% | 0% | 36% | 63%
pyrobot_bridge/nodes0% | 0% | 0% | 17% | 82%
robots/LoCoBot/locobot_gazebo0% | 0% | 0% | 14% | 85%
src/pyrobot/allegro_hand0% | 0% | 0% | 17% | 82%
robots/LoCoBot/locobot_navigation0% | 0% | 0% | 4% | 95%
src/pyrobot/vrep_locobot0% | 0% | 0% | 12% | 87%
src/pyrobot/ur50% | 0% | 0% | 48% | 51%
src/pyrobot/sawyer0% | 0% | 0% | 0% | 100%
robots/LoCoBot/turtlebot_controller0% | 0% | 0% | 0% | 100%
src/pyrobot/kinect20% | 0% | 0% | 0% | 100%
src/pyrobot/cfg0% | 0% | 0% | 0% | 100%
ROOT0% | 0% | 0% | 0% | 100%
src/pyrobot/azure_kinect0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def run()
in robots/LoCoBot/locobot_control/scripts/locobot_control/teleoperation.py
102 36 1
def ik()
in robots/LoCoBot/locobot_control/scripts/locobot_control/analytic_ik.py
79 24 4
bool LoCoBotController::jointCommandMsgCallback()
in robots/LoCoBot/locobot_control/src/locobot_controller.cpp
84 21 2
def _step_angle()
in src/pyrobot/locobot/base_controllers.py
46 20 2
def _step_x()
in src/pyrobot/locobot/base_controllers.py
54 20 2
void LoCoBotController::publishCallback()
in robots/LoCoBot/locobot_control/src/locobot_controller.cpp
148 19 1
def collect_data()
in robots/LoCoBot/locobot_calibration/scripts/collect_calibration_data.py
90 18 2
void LoCoBotController::gripperController()
in robots/LoCoBot/locobot_control/src/locobot_controller.cpp
76 17 1
void LoCoBotController::hardwareStatusPublish()
in robots/LoCoBot/locobot_control/src/locobot_controller.cpp
92 17 1
def pix_to_3dpt()
in src/pyrobot/utils/util.py
63 17 7
bool LoCoBotController::initDynamixels()
in robots/LoCoBot/locobot_control/src/locobot_controller.cpp
34 13 1
def get_plan()
in robots/LoCoBot/locobot_control/nodes/pointrobot3factor_ros_server.py
70 11 6
bool LoCoBotController::initControlItems()
in robots/LoCoBot/locobot_control/src/locobot_controller.cpp
43 11 1
void LoCoBotController::readCallback()
in robots/LoCoBot/locobot_control/src/locobot_controller.cpp
93 11 1
def moveToPose()
in src/pyrobot/utils/move_group_interface.py
73 11 5
def motionPlanToPose()
in src/pyrobot/utils/move_group_interface.py
67 11 5
def waitForSync()
in src/pyrobot/utils/planning_scene_interface.py
32 11 2
void LoCoBotController::execute_joint_trajectory()
in robots/LoCoBot/locobot_control/src/locobot_controller.cpp
56 10 1
int main()
in robots/LoCoBot/locobot_control/src/locobot_controller.cpp
69 10 2
def _go_to_relative_pose()
in src/pyrobot/habitat/base.py
34 10 4