Expand description
Telemetry decoding, aggregation, and chart-ready view models for WoW Lab.
§Example
use wowlab_analytics::new_running_state;
let state = new_running_state(4);
assert_eq!(state.chunks_total, 4);
assert_eq!(state.chunks_completed, 0);Modules§
- analytics 🔒
- Analytics layer: decode protobuf blobs and derive chart-ready view models.
- test_
support - Minimal protobuf fixtures shared by analytics tests.
Structs§
- Action
View - Per-spell action summary: casts, hits, damage, resource flow, derived DPS.
- Analytics
Decode Error - Failure to decode or validate an analytics protobuf payload.
- Analytics
View - Chart-ready view model returned across the WASM boundary.
- Aura
View - Per-aura uptime stats with application and refresh counts.
- Aura
Window View - Time range during which an aura was active on a target.
- Cooldown
View - Per-cooldown efficiency and drift summary.
- Cooldown
Window View - Time range during which a cooldown-bound ability was active.
- Core
View - Headline core metrics for a simulation run (iterations, mean DPS, spread).
- Damage
ByTarget View - Damage dealt to a single target, with derived share of total damage.
- Damage
Profile View - Damage profile split by direct, periodic, pet, and per-target damage.
- Dictionary
Map - Lookup tables for dictionary-encoded ids in the analytics view.
- Distribution
View - DPS distribution summary: histogram plus canonical percentile buckets.
- Encounter
Event View - Encounter lifecycle observation in its original causal sequence.
- Execution
View - Execution-time breakdown (active, idle, GCD-locked) with per-bucket action rates.
- Histogram
View - Equal-width DPS histogram with underflow and overflow counters.
- Marker
View - A single timeline marker such as a damage, cast, resource, or proc event.
- Merge
Error - Error produced while merging a chunk into the running state.
- Percentiles
View - Canonical DPS percentiles (p01 through p99) for distribution summaries.
- Permutation
Summary View - One permutation in the ranked top-N output.
- Phase
Marker View - Named phase boundary in the fight timeline.
- Resource
View - Per-resource flow: gained, spent, wasted, and time spent at cap or starved.
- Slot
Diff View - A single slot override that distinguishes a permutation from baseline.
- Slot
Item Entry View - A single ranked item within a slot’s top-N.
- Slot
Ranking View - Per-slot ranked candidate items from the tournament.
- Target
MapEntry - Dictionary entry mapping a target id to a display label.
- Timeline
View - Bucketed fight timeline with DPS series and event windows.
- Tournament
Stats View - Headline tournament stats: winner vs baseline DPS, phases completed, totals.
- Tournament
View - Chart-ready view model for a finalized tournament job.
- Unit
MapEntry - Collision-free tagged unit dictionary entry.
Enums§
- Analytics
Decode Stage - Protobuf or validation stage that rejected an analytics payload.
- JobResult
View - Tagged decoded result envelope: discriminates single vs tournament vs legacy.
Functions§
- decode_
and_ derive - Decode
ResultViewV1andTimelineViewV1protobuf bytes into a chart-readyAnalyticsView. - decode_
chunk_ telemetry - Decode a single
ChunkTelemetryblob into anAnalyticsView(timeline alwaysNone). - decode_
job_ result - Decode the
JobResult+JobTimelineenvelope, falling back todecode_and_derivewhen the oneof is unset. - emit_
result_ snapshot - Emit a
ResultViewV1snapshot derived from the current running state. - emit_
timeline_ snapshot - Emit a
TimelineViewV1snapshot derived from the current running state. - merge_
chunk - Incrementally merge a
ChunkTelemetryintoRunningAggregateStateV1. - new_
running_ state - Build a zeroed
RunningAggregateStateV1sized forchunks_totalchunks. - validate_
chunk - Validate a chunk against the running state before merging it in.