aws-samples / aws-open-source-rover-challenge
Unit Size

The distribution of size of units (measured in lines of code).

Intro
  • Unit size measurements show the distribution of size of units of code (methods, functions...).
  • Units are classified in four categories based on their size (lines of code): 1-20 (small units), 20-50 (medium size units), 51-100 (long units), 101+ (very long units).
  • You should aim at keeping units small (< 20 lines). Long units may become "bloaters", code that have increased to such gargantuan proportions that they are hard to work with.
Learn more...
Unit Size Overall
  • There are 144 units with 3,097 lines of code in units (47.3% of code).
    • 5 very long units (698 lines of code)
    • 15 long units (982 lines of code)
    • 23 medium size units (699 lines of code)
    • 22 small units (294 lines of code)
    • 79 very small units (424 lines of code)
22% | 31% | 22% | 9% | 13%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
cpp32% | 36% | 18% | 4% | 7%
py10% | 29% | 29% | 14% | 14%
h0% | 0% | 22% | 25% | 52%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
rover/hector_gazebo_plugins/src36% | 33% | 17% | 4% | 7%
rl-agent/markov/environments15% | 28% | 31% | 13% | 10%
rover/message_to_tf/src0% | 66% | 24% | 0% | 9%
rl-agent/markov0% | 33% | 25% | 18% | 23%
rover/hector_gazebo_plugins/include0% | 0% | 22% | 25% | 52%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
void GazeboRosIMU::Update()
in simulation_ws/src/rover/hector_gazebo_plugins/src/gazebo_ros_imu.cpp
185 6 0
void GazeboRosDiffDriveMultiWheel::Load()
in simulation_ws/src/rover/hector_gazebo_plugins/src/diffdrive_plugin_multi_wheel.cpp
148 21 2
void GazeboRosForceBasedMove::Load()
in simulation_ws/src/rover/hector_gazebo_plugins/src/gazebo_ros_force_based_move.cpp
129 14 2
void GazeboRosIMU::Load()
in simulation_ws/src/rover/hector_gazebo_plugins/src/gazebo_ros_imu.cpp
122 19 2
def reward_function()
in simulation_ws/src/rl-agent/markov/environments/mars_env.py
114 44 1
void GazeboRosGps::Load()
in simulation_ws/src/rover/hector_gazebo_plugins/src/gazebo_ros_gps.cpp
83 17 2
def reward_function()
in simulation_ws/src/rl-agent/markov/environments/training_env.py
77 34 1
void ServoPlugin::Load()
in simulation_ws/src/rover/hector_gazebo_plugins/src/servo_plugin.cpp
77 26 2
int main()
in simulation_ws/src/rover/message_to_tf/src/message_to_tf.cpp
75 12 2
void GazeboRosMagnetic::Load()
in simulation_ws/src/rover/hector_gazebo_plugins/src/gazebo_ros_magnetic.cpp
69 14 2
void GazeboRosDiffDriveMultiWheel::publishOdometry()
in simulation_ws/src/rover/hector_gazebo_plugins/src/diffdrive_plugin_multi_wheel.cpp
67 3 1
def rover_reset()
in simulation_ws/src/rl-agent/markov/environments/mars_env.py
66 2 1
void ServoPlugin::Update()
in simulation_ws/src/rover/hector_gazebo_plugins/src/servo_plugin.cpp
64 14 0
void DiffDrivePlugin6W::Load()
in simulation_ws/src/rover/hector_gazebo_plugins/src/diffdrive_plugin_6w.cpp
63 21 2
void sendTransform()
in simulation_ws/src/rover/message_to_tf/src/message_to_tf.cpp
62 13 3
def rover_reset()
in simulation_ws/src/rl-agent/markov/environments/training_env.py
61 2 1
def main()
in simulation_ws/src/rl-agent/markov/rover_agent.py
57 3 0
def main()
in simulation_ws/src/rl-agent/markov/model_evaluation.py
55 4 0
void GazeboRosSonar::Load()
in simulation_ws/src/rover/hector_gazebo_plugins/src/gazebo_ros_sonar.cpp
55 6 2
void DiffDrivePlugin6W::publish_odometry()
in simulation_ws/src/rover/hector_gazebo_plugins/src/diffdrive_plugin_6w.cpp
51 1 0