My Performance

User analytics, filtering, and KPI dashboard
GET Authenticated
/app/performance.html

Provides a full analytical view of a user's performance across finalised games, including KPIs, filters, and event-level scoring.

Purpose

  • Summarise player performance
  • Provide multi-dimensional filtering
  • Break down scoring by event type
  • List all filtered games
Only finalised games are included. [oai_citation:0‡performance.html](sediment://file_000000001a647243ae25b3bb05ba5663)

Data sources

SourcePurpose
games/list.php Base dataset (all games)
games/play_state.php Event-level scoring data

UI structure

  • Top navigation bar (standardised)
  • Filters panel
  • KPI summary cards
  • Event-type scoring breakdown
  • Games table

Filters

FilterDescription
OpponentFilter by opponent name
ScenarioFilter by scenario
My race/factionPlayer’s army
Opponent race/factionOpponent army
Include archivedToggle archived games
Filters are applied client-side after initial load. [oai_citation:1‡performance.html](sediment://file_000000001a647243ae25b3bb05ba5663)

KPI calculations

KPILogic
Games played Count of filtered finalised games
Win / Loss / Draw Based on result or score difference
Avg degree of victory Mean of (my_score − opp_score)
Avg points scored Mean of my_score

Result determination

  • Uses explicit result field if available
  • Fallback:
    • Win: diff > 100
    • Loss: diff < -100
    • Draw: otherwise
This ensures backward compatibility with incomplete data. [oai_citation:2‡performance.html](sediment://file_000000001a647243ae25b3bb05ba5663)

Event scoring breakdown

  • Fetches events per game via play_state
  • Filters events by player side
  • Aggregates:
    • Total points per event type
    • Average per game
Uses cached event map to avoid duplicate API calls. [oai_citation:3‡performance.html](sediment://file_000000001a647243ae25b3bb05ba5663)

Data flow

  1. Load all games via API
  2. Filter to finalised
  3. Populate filter dropdowns
  4. Apply client-side filters
  5. Render:
    • KPIs
    • Games table
    • Event breakdown

Performance considerations

  • Client-side filtering (fast, but scales with dataset)
  • Event data fetched per game (potential bottleneck)
  • Caching via EVENTS_BY_GAME
This design trades API simplicity for frontend load cost. [oai_citation:4‡performance.html](sediment://file_000000001a647243ae25b3bb05ba5663)

Known risks

  • N+1 API calls for event data
  • Large datasets may impact performance
  • No pagination

Future improvements

  • Move aggregation to backend (API endpoint)
  • Add pagination / lazy loading
  • Pre-aggregate KPIs in DB
  • Cache event summaries per game