facebookresearch / polymetis
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 213 units with 1,729 lines of code in units (12.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (76 lines of code)
    • 8 simple units (226 lines of code)
    • 204 very simple units (1,427 lines of code)
0% | 0% | 4% | 13% | 82%
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
hpp0% | 0% | 85% | 0% | 14%
py0% | 0% | 0% | 12% | 87%
cpp0% | 0% | 0% | 17% | 82%
h0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
polymetis/include0% | 0% | 73% | 0% | 26%
polymetis/src/clients0% | 0% | 0% | 35% | 64%
polymetis/python/scripts0% | 0% | 0% | 33% | 66%
polymetis/python/polysim0% | 0% | 0% | 18% | 81%
polymetis/src0% | 0% | 0% | 14% | 85%
polymetis/python/polymetis0% | 0% | 0% | 8% | 91%
polymetis/python/torchcontrol0% | 0% | 0% | 0% | 100%
polymetis/src/torchscript_operators0% | 0% | 0% | 0% | 100%
polymetis/include/polymetis0% | 0% | 0% | 0% | 100%
polymetis/python/hydra_plugins0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
int create_real_time_thread()
in polymetis/include/real_time.hpp
76 12 1
def initialize_graphs()
in polymetis/python/scripts/viz.py
36 9 2
def process_queue()
in polymetis/python/scripts/viz.py
22 8 1
void FrankaTorqueControlClient::computeSafetyReflex()
in polymetis/src/clients/franka_panda_client/franka_panda_client.cpp
32 8 8
def reset_then_step()
in polymetis/python/polysim/envs/bullet_locomotor.py
24 7 3
def run()
in polymetis/python/polysim/grpc_sim_client.py
30 7 2
def which()
in polymetis/python/polymetis/utils/data_dir.py
13 6 1
void FrankaTorqueControlClient::run()
in polymetis/src/clients/franka_panda_client/franka_panda_client.cpp
36 6 0
int main()
in polymetis/src/run_server.cpp
33 6 2
def reset()
in polymetis/python/polysim/envs/bullet_manipulator.py
12 5 3
def execute_rpc_call()
in polymetis/python/polysim/grpc_sim_client.py
16 5 4
void FrankaTorqueControlClient::updateServerCommand()
in polymetis/src/clients/franka_panda_client/franka_panda_client.cpp
27 5 2
void FrankaTorqueControlClient::checkStateLimits()
in polymetis/src/clients/franka_panda_client/franka_panda_client.cpp
42 5 2
18 5 3
Status PolymetisControllerServerImpl::SetController()
in polymetis/src/polymetis_server.cpp
33 5 3
36 5 3
def _get_msg_generator()
in polymetis/python/polymetis/robot_interface.py
12 4 1
def main()
in polymetis/python/scripts/launch_robot.py
39 4 1
def update()
in polymetis/python/scripts/viz.py
6 4 1
def main()
in polymetis/python/scripts/viz.py
42 4 1