aws-samples / multi-robot-fleet-sample-application
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 20 units with 282 lines of code in units (31.7% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 2 simple units (62 lines of code)
    • 18 very simple units (220 lines of code)
0% | 0% | 0% | 21% | 78%
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% | 0% | 27% | 72%
cc0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
setup/fleetLauncherApp/fleetLauncherLambda0% | 0% | 0% | 68% | 32%
simulation_ws/src/robot_fleet/scripts0% | 0% | 0% | 7% | 92%
simulation_ws/src/robot_fleet/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in setup/fleetLauncherApp/fleetLauncherLambda/app.py
51 10 2
def timer_callback()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
11 6 2
def main()
in simulation_ws/src/robot_fleet/scripts/client_rosbridge.py
30 4 1
def main()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
26 4 1
def create_application_config()
in setup/fleetLauncherApp/fleetLauncherLambda/app.py
24 4 3
public: void Load()
in simulation_ws/src/robot_fleet/src/move_object.cc
29 3 2
def __init__()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
17 3 1
public: virtual ~MoveObject()
in simulation_ws/src/robot_fleet/src/move_object.cc
9 2 0
public: void OnUpdate()
in simulation_ws/src/robot_fleet/src/move_object.cc
7 2 0
private: void QueueThread()
in simulation_ws/src/robot_fleet/src/move_object.cc
8 2 0
def __init__()
in simulation_ws/src/robot_fleet/scripts/client_rosbridge.py
17 2 1
def init_pubs()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
4 2 1
public: void OnPoseCallback()
in simulation_ws/src/robot_fleet/src/move_object.cc
5 1 1
def model_states_callback()
in simulation_ws/src/robot_fleet/scripts/client_rosbridge.py
2 1 2
def init_rosbridge_talkers()
in simulation_ws/src/robot_fleet/scripts/client_rosbridge.py
2 1 1
def remap_subscriber()
in simulation_ws/src/robot_fleet/scripts/client_rosbridge.py
3 1 2
def create_pub()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
2 1 2
def init_subs()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
5 1 1
def create_model()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
17 1 4
def data_callback()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
13 1 2