aws-deepracer / aws-deepracer-simulation-training-notebook
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 1,315 units with 15,944 lines of code in units (76.1% of code).
    • 5 very long units (873 lines of code)
    • 31 long units (2,043 lines of code)
    • 170 medium size units (5,175 lines of code)
    • 271 small units (3,885 lines of code)
    • 838 very small units (3,968 lines of code)
5% | 12% | 32% | 24% | 24%
Legend:
101+
51-100
21-50
11-20
1-10
Unit Size per Extension
101+
51-100
21-50
11-20
1-10
py5% | 12% | 32% | 24% | 24%
Unit Size per Logical Component
primary logical decomposition
101+
51-100
21-50
11-20
1-10
src/markov30% | 14% | 26% | 19% | 9%
common/sagemaker_rl/orchestrator5% | 26% | 32% | 17% | 18%
src/markov/boto5% | 7% | 45% | 25% | 16%
src/markov/agent_ctrl0% | 26% | 36% | 21% | 15%
src/markov/track_geom0% | 20% | 22% | 28% | 29%
src/markov/cameras0% | 15% | 26% | 18% | 39%
src0% | 77% | 0% | 0% | 22%
src/markov/log_handler0% | 19% | 17% | 14% | 48%
src/lib/model_validator0% | 48% | 0% | 23% | 27%
src/markov/architecture0% | 35% | 32% | 23% | 8%
src/markov/virtual_event0% | 8% | 33% | 31% | 26%
src/markov/multi_agent_coach0% | 0% | 48% | 21% | 30%
common/sagemaker_rl0% | 0% | 27% | 38% | 34%
src/markov/metrics0% | 0% | 46% | 31% | 22%
src/markov/sensors0% | 0% | 27% | 17% | 55%
src/markov/gazebo_tracker0% | 0% | 39% | 41% | 18%
src/markov/environments0% | 0% | 74% | 20% | 5%
common0% | 0% | 26% | 23% | 50%
src/markov/domain_randomizations0% | 0% | 51% | 26% | 21%
src/markov/gazebo_utils0% | 0% | 34% | 26% | 38%
src/lib/scripts0% | 0% | 43% | 27% | 28%
src/markov/agents0% | 0% | 27% | 38% | 34%
src/markov/memories0% | 0% | 15% | 30% | 54%
ROOT0% | 0% | 46% | 25% | 27%
src/artifacts/rewards0% | 0% | 30% | 59% | 9%
src/markov/reset0% | 0% | 10% | 42% | 47%
src/lib0% | 0% | 31% | 17% | 51%
src/markov/spawn0% | 0% | 0% | 77% | 22%
src/markov/visual_effects0% | 0% | 0% | 42% | 57%
src/markov/auth0% | 0% | 0% | 100% | 0%
src/markov/state_machine0% | 0% | 0% | 34% | 65%
src/markov/presets0% | 0% | 0% | 0% | 100%
src/markov/filters0% | 0% | 0% | 0% | 100%
src/markov/visualizations0% | 0% | 0% | 0% | 100%
src/markov/exploration_policies0% | 0% | 0% | 0% | 100%
Alternative Visuals
Longest Units
Top 20 longest units
Unit# linesMcCabe index# params
def main()
in src/markov/rollout_worker.py
229 25 0
def main()
in src/markov/evaluation_worker.py
215 25 0
def main()
in src/markov/training_worker.py
170 17 0
def get_cloudwatch_dashboard_json_for_experiment_id()
in common/sagemaker_rl/orchestrator/utils/cloudwatch_logger.py
158 1 3
def parse_model_metadata()
in src/markov/boto/s3/files/model_metadata.py
101 28 1
def __init__()
in src/markov/agent_ctrl/rollout_agent_ctrl.py
92 21 4
def training_worker()
in src/markov/training_worker.py
85 33 5
def get_graph_manager()
in src/markov/sagemaker_graph_manager.py
84 1 6
def evaluate_model()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
83 27 4
def set_reward_and_metrics()
in src/markov/agent_ctrl/utils.py
81 12 9
def _calculate_frustum_planes()
in src/markov/cameras/frustum.py
81 7 3
def __init__()
in src/markov/boto/s3/files/checkpoint.py
81 4 10
def _update_experiment_db_hosting_workflow_metadata()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
77 19 2
def deploy_model()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
76 32 4
def rollout_worker()
in src/markov/rollout_worker.py
74 30 7
def __init__()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
72 11 7
def __init__()
in common/sagemaker_rl/orchestrator/workflow/manager/model_manager.py
69 8 21
def train_next_model()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
67 25 4
def _build_spline()
in src/markov/track_geom/spline/lane_change_spline.py
66 9 1
def initialize_first_model()
in common/sagemaker_rl/orchestrator/workflow/manager/experiment_manager.py
65 21 3