aws-samples / amazon-sagemaker-unity-game-simulation
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 339 units with 4,435 lines of code in units (49.4% of code).
    • 0 very complex units (0 lines of code)
    • 2 complex units (199 lines of code)
    • 13 medium complex units (761 lines of code)
    • 25 simple units (733 lines of code)
    • 299 very simple units (2,742 lines of code)
0% | 4% | 17% | 16% | 61%
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% | 4% | 17% | 15% | 62%
cs0% | 0% | 0% | 47% | 52%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
common/sagemaker_rl/orchestrator/workflow0% | 10% | 32% | 15% | 41%
common/sagemaker_rl0% | 0% | 6% | 19% | 74%
common/sagemaker_rl/orchestrator0% | 0% | 16% | 9% | 73%
src0% | 0% | 0% | 63% | 36%
RollerBall/Assets0% | 0% | 0% | 47% | 52%
common0% | 0% | 0% | 0% | 100%
common/sagemaker_rl/orchestrator/clients0% | 0% | 0% | 0% | 100%
common/sagemaker_rl/orchestrator/utils0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def deploy_model()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
96 32 4
def evaluate_model()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
103 27 4
def train_next_model()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
87 25 4
def initialize_first_model()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
83 21 3
def sync_experiment_state_with_ddb()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
67 20 1
def _update_experiment_db_hosting_workflow_metadata()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
79 19 2
def join()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
72 16 5
def _update_experiment_db_training_workflow_metadata()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
70 15 2
def _update_model_table_evaluation_states()
in common/sagemaker_rl/orchestrator/workflow/manager/model_manager.py
63 14 1
def _usable_shared_cf_stack_exists()
in common/sagemaker_rl/orchestrator/resource_manager.py
62 13 1
def copy_checkpoints_to_model_output()
in common/sagemaker_rl/ray_launcher.py
31 13 1
def get_config_args()
in common/sagemaker_rl/coach_launcher.py
31 11 2
def ingest_joined_data()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
44 11 3
def _update_join_table_states()
in common/sagemaker_rl/orchestrator/workflow/manager/join_manager.py
25 11 2
def _update_model_table_training_states()
in common/sagemaker_rl/orchestrator/workflow/manager/model_manager.py
47 11 1
def run()
in src/evaluate-unity.py
57 10 2
def _update_metrics_from_latest_eval_job()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
32 10 2
def get_eval_score()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
37 10 3
def set_up_checkpoint()
in common/sagemaker_rl/ray_launcher.py
44 10 2
public override void OnActionReceived()
in RollerBall/Assets/RollerAgent.cs
32 8 1