aws-samples / aws-robomaker-sample-application-meirorunner
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 66 units with 953 lines of code in units (7.9% of code).
    • 0 very long units (0 lines of code)
    • 5 long units (289 lines of code)
    • 6 medium size units (187 lines of code)
    • 20 small units (309 lines of code)
    • 35 very small units (168 lines of code)
0% | 30% | 19% | 32% | 17%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py0% | 30% | 19% | 32% | 17%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
robot_ws/src/rl_agent/markov0% | 38% | 22% | 22% | 16%
ROOT0% | 19% | 10% | 50% | 18%
robot_ws/src/turtlebot_controller/robomaker0% | 0% | 32% | 46% | 20%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in robot_ws/src/rl_agent/markov/rollout_worker.py
64 4 0
def main()
in robot_ws/src/rl_agent/markov/single_machine_training_worker.py
58 3 0
def infer_reward_state()
in robot_ws/src/rl_agent/markov/environments/meiro_runner_env.py
56 15 2
def postProcess()
in ws_setup.py
56 8 1
def main()
in robot_ws/src/rl_agent/markov/evaluation_worker.py
55 4 0
def load_from_store()
in robot_ws/src/rl_agent/markov/s3_boto_data_store.py
43 12 2
def save_to_store()
in robot_ws/src/rl_agent/markov/s3_boto_data_store.py
42 9 1
def entry()
in ws_setup.py
29 8 1
def turtlebot3_reset()
in robot_ws/src/rl_agent/markov/environments/meiro_runner_env.py
26 1 1
def __init__()
in robot_ws/src/rl_agent/markov/environments/meiro_runner_env.py
25 2 1
def takeAction()
in robot_ws/src/turtlebot_controller/robomaker/inference_worker.py
22 6 2
def step()
in robot_ws/src/rl_agent/markov/environments/meiro_runner_env.py
20 6 2
def _download_directory()
in robot_ws/src/rl_agent/markov/s3_boto_data_store.py
19 6 4
18 6 1
def setup_iam_role()
in ws_setup.py
18 6 1
18 2 1
18 2 1
17 2 1
def _wait_for_ip_upload()
in robot_ws/src/rl_agent/markov/s3_boto_data_store.py
16 6 2
def callback_scan()
in robot_ws/src/turtlebot_controller/robomaker/inference_worker.py
16 2 2