Skip to content

fix: Avg. Tasks/Shift update live #977 - #994

Merged
Michael-Mezzacappa merged 3 commits into
mainfrom
bugfix/977-change-average-tasks-serviced-per-shift
Apr 13, 2026
Merged

fix: Avg. Tasks/Shift update live #977#994
Michael-Mezzacappa merged 3 commits into
mainfrom
bugfix/977-change-average-tasks-serviced-per-shift

Conversation

@Michael-Mezzacappa

Copy link
Copy Markdown
Collaborator

Proposed Changes:

Real-time average tasks serviced per active driver metric

Details:

  • tasks_completed_per_shift changed from list[int] (recorded once per shift end) to an int counter incremented immediately when a task is serviced
  • get_average_tasks_per_shift() now takes active_driver_count and returns total_tasks_completed / active_driver_count, giving a live rolling average across all drivers currently on the map
  • Active driver count is computed each frame, excluding drivers in OFF_SHIFT or PENDING_SHIFT states
  • replay_parser.py handles backwards compatibility, old keyframes that stored this as a list are coerced to an int via summation on restore

Related Issues:

@Michael-Mezzacappa Michael-Mezzacappa self-assigned this Apr 13, 2026
@Michael-Mezzacappa Michael-Mezzacappa added bug Something isn't working simulator Issues related to Simulator labels Apr 13, 2026
@Michael-Mezzacappa
Michael-Mezzacappa force-pushed the bugfix/977-change-average-tasks-serviced-per-shift branch from 8c74f4f to 5b25036 Compare April 13, 2026 21:58
@Niravanaa Niravanaa removed this from the Iteration 13 (Release 3) milestone Apr 13, 2026

@cmezzac cmezzac left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Michael-Mezzacappa
Michael-Mezzacappa merged commit 2377640 into main Apr 13, 2026
7 checks passed
@Michael-Mezzacappa
Michael-Mezzacappa deleted the bugfix/977-change-average-tasks-serviced-per-shift branch April 13, 2026 23:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working simulator Issues related to Simulator

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change Average Tasks Serviced Per Shift

3 participants