aws-robotics / aws-robomaker-sample-application-cloudwatch
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 27 units with 340 lines of code in units (49.6% of code).
    • 0 very long units (0 lines of code)
    • 0 long units (0 lines of code)
    • 6 medium size units (163 lines of code)
    • 5 small units (80 lines of code)
    • 16 very small units (97 lines of code)
0% | 0% | 47% | 23% | 28%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 0% | 47% | 23% | 28%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
simulation_ws/src/aws_robomaker_simulation_common/nodes0% | 0% | 44% | 38% | 16%
robot_ws/src/cloudwatch_robot/nodes0% | 0% | 49% | 0% | 50%
scripts0% | 0% | 56% | 43% | 0%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def route_forever()
in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py
43 10 1
def _create_pos()
in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py
29 2 7
def odom_to_speed()
in robot_ws/src/cloudwatch_robot/nodes/monitor_speed.py
24 1 1
def report_metric()
in robot_ws/src/cloudwatch_robot/nodes/monitor_obstacle_distance.py
24 2 2
def main()
in scripts/add_map_plugin.py
22 2 0
def report_metric()
in robot_ws/src/cloudwatch_robot/nodes/monitor_distance_to_goal.py
21 2 2
def get_next()
in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py
20 4 1
def __init__()
in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py
17 4 1
def process_args()
in scripts/add_map_plugin.py
17 5 2
def __init__()
in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py
13 5 1
def check_noise()
in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py
13 4 4
def rotate_forever()
in robot_ws/src/cloudwatch_robot/nodes/rotate.py
10 2 1
def to_move_goal()
in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py
10 2 2
def filter_scan()
in robot_ws/src/cloudwatch_robot/nodes/monitor_obstacle_distance.py
9 4 2
def main()
in robot_ws/src/cloudwatch_robot/nodes/monitor_distance_to_goal.py
8 3 0
def main()
in robot_ws/src/cloudwatch_robot/nodes/monitor_speed.py
8 2 0
def main()
in robot_ws/src/cloudwatch_robot/nodes/monitor_obstacle_distance.py
8 3 0
def grid_to_world_2d()
in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py
8 1 3
def main()
in robot_ws/src/cloudwatch_robot/nodes/rotate.py
7 2 0
def main()
in simulation_ws/src/aws_robomaker_simulation_common/nodes/route_manager.py
7 2 0