aws-samples / multi-robot-fleet-sample-application
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 20 units with 282 lines of code in units (31.7% of code).
    • 0 very long units (0 lines of code)
    • 1 long units (51 lines of code)
    • 4 medium size units (109 lines of code)
    • 5 small units (75 lines of code)
    • 10 very small units (47 lines of code)
0% | 18% | 38% | 26% | 16%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 22% | 35% | 33% | 8%
cc0% | 0% | 50% | 0% | 50%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
setup/fleetLauncherApp/fleetLauncherLambda0% | 68% | 32% | 0% | 0%
simulation_ws/src/robot_fleet/scripts0% | 0% | 37% | 50% | 12%
simulation_ws/src/robot_fleet/src0% | 0% | 50% | 0% | 50%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def lambda_handler()
in setup/fleetLauncherApp/fleetLauncherLambda/app.py
51 10 2
def main()
in simulation_ws/src/robot_fleet/scripts/client_rosbridge.py
30 4 1
public: void Load()
in simulation_ws/src/robot_fleet/src/move_object.cc
29 3 2
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
def __init__()
in simulation_ws/src/robot_fleet/scripts/client_rosbridge.py
17 2 1
def __init__()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
17 3 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
def timer_callback()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
11 6 2
public: virtual ~MoveObject()
in simulation_ws/src/robot_fleet/src/move_object.cc
9 2 0
private: void QueueThread()
in simulation_ws/src/robot_fleet/src/move_object.cc
8 2 0
public: void OnUpdate()
in simulation_ws/src/robot_fleet/src/move_object.cc
7 2 0
public: void OnPoseCallback()
in simulation_ws/src/robot_fleet/src/move_object.cc
5 1 1
def init_subs()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
5 1 1
def init_pubs()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
4 2 1
def remap_subscriber()
in simulation_ws/src/robot_fleet/scripts/client_rosbridge.py
3 1 2
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 create_pub()
in simulation_ws/src/robot_fleet/scripts/gazebo_model_mover.py
2 1 2