aws-samples / aws-robomaker-sample-application-meirorunner
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 66 units with 953 lines of code in units (7.9% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (99 lines of code)
    • 10 simple units (249 lines of code)
    • 54 very simple units (605 lines of code)
0% | 0% | 10% | 26% | 63%
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% | 10% | 26% | 63%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
robot_ws/src/rl_agent/markov0% | 0% | 16% | 16% | 67%
ROOT0% | 0% | 0% | 46% | 53%
robot_ws/src/turtlebot_controller/robomaker0% | 0% | 0% | 32% | 67%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def infer_reward_state()
in robot_ws/src/rl_agent/markov/environments/meiro_runner_env.py
56 15 2
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 postProcess()
in ws_setup.py
56 8 1
def entry()
in ws_setup.py
29 8 1
def _download_directory()
in robot_ws/src/rl_agent/markov/s3_boto_data_store.py
19 6 4
def _wait_for_ip_upload()
in robot_ws/src/rl_agent/markov/s3_boto_data_store.py
16 6 2
def step()
in robot_ws/src/rl_agent/markov/environments/meiro_runner_env.py
20 6 2
def takeAction()
in robot_ws/src/turtlebot_controller/robomaker/inference_worker.py
22 6 2
9 6 1
18 6 1
def setup_iam_role()
in ws_setup.py
18 6 1
def calc_footsteps_mark_position()
in robot_ws/src/rl_agent/markov/environments/meiro_runner_env.py
8 5 3
def setup_subnets()
in ws_setup.py
9 5 1
def main()
in robot_ws/src/rl_agent/markov/rollout_worker.py
64 4 0
def main()
in robot_ws/src/rl_agent/markov/evaluation_worker.py
55 4 0
def wait_for_checkpoint()
in robot_ws/src/rl_agent/markov/utils.py
14 4 3
16 4 1
16 4 1
def setup_vpc()
in ws_setup.py
8 4 1