Skip to content

Add PMC/Scav breakdown to server-wide stats page - #357

Merged
cebarks merged 2 commits into
mainfrom
fix-stats-pmc-scav
Jul 29, 2026
Merged

Add PMC/Scav breakdown to server-wide stats page#357
cebarks merged 2 commits into
mainfrom
fix-stats-pmc-scav

Conversation

@cebarks

@cebarks cebarks commented Jul 29, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds PMC and Scav raid counts and survival rates to the server-wide stats page at /quma/stats
  • Previously only per-user profile pages showed this breakdown
  • Displays PMC and Scav stats in equal-weight side-by-side cards

Changes

  • Added pmc_raids, scav_raids, pmc_survival_rate, scav_survival_rate fields to ServerRaidStats struct
  • Query PMC/Scav stats in get_server_raid_stats() using player_side='Pmc' and player_side='Savage' filters (headless clients excluded)
  • Updated stats.html template with new PMC/Scav stat cards

Test plan

  • Code compiles (just check)
  • Clippy passes (just clippy)
  • TODO.md updated (removed completed bug entry)

Implemented with the help of Claude Code

cebarks and others added 2 commits July 28, 2026 22:34
Adds PMC and Scav raid counts and survival rates to the server-wide stats
page at /quma/stats. Previously only per-user profile pages showed this
breakdown.

Changes:
- Add pmc_raids, scav_raids, pmc_survival_rate, scav_survival_rate fields
  to ServerRaidStats struct
- Query PMC/Scav stats in get_server_raid_stats() using player_side='Pmc'
  and player_side='Savage' filters (headless clients excluded)
- Display PMC and Scav stats in equal-weight cards on stats.html

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Reduces database round-trips by combining separate count and survived
queries into single queries using SUM(CASE WHEN ...), matching the
existing overall_survival_rate pattern.

Before: 4 queries (PMC count, PMC survived, Scav count, Scav survived)
After: 2 queries (PMC combined, Scav combined)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@cebarks
cebarks force-pushed the fix-stats-pmc-scav branch from 2e68378 to aa2f554 Compare July 29, 2026 04:34
@cebarks
cebarks enabled auto-merge (squash) July 29, 2026 04:34
@cebarks
cebarks merged commit 586d27d into main Jul 29, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant