Skip to main content

Crate wowlab_analytics

Crate wowlab_analytics 

Source
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§

ActionView
Per-spell action summary: casts, hits, damage, resource flow, derived DPS.
AnalyticsDecodeError
Failure to decode or validate an analytics protobuf payload.
AnalyticsView
Chart-ready view model returned across the WASM boundary.
AuraView
Per-aura uptime stats with application and refresh counts.
AuraWindowView
Time range during which an aura was active on a target.
CooldownView
Per-cooldown efficiency and drift summary.
CooldownWindowView
Time range during which a cooldown-bound ability was active.
CoreView
Headline core metrics for a simulation run (iterations, mean DPS, spread).
DamageByTargetView
Damage dealt to a single target, with derived share of total damage.
DamageProfileView
Damage profile split by direct, periodic, pet, and per-target damage.
DictionaryMap
Lookup tables for dictionary-encoded ids in the analytics view.
DistributionView
DPS distribution summary: histogram plus canonical percentile buckets.
EncounterEventView
Encounter lifecycle observation in its original causal sequence.
ExecutionView
Execution-time breakdown (active, idle, GCD-locked) with per-bucket action rates.
HistogramView
Equal-width DPS histogram with underflow and overflow counters.
MarkerView
A single timeline marker such as a damage, cast, resource, or proc event.
MergeError
Error produced while merging a chunk into the running state.
PercentilesView
Canonical DPS percentiles (p01 through p99) for distribution summaries.
PermutationSummaryView
One permutation in the ranked top-N output.
PhaseMarkerView
Named phase boundary in the fight timeline.
ResourceView
Per-resource flow: gained, spent, wasted, and time spent at cap or starved.
SlotDiffView
A single slot override that distinguishes a permutation from baseline.
SlotItemEntryView
A single ranked item within a slot’s top-N.
SlotRankingView
Per-slot ranked candidate items from the tournament.
TargetMapEntry
Dictionary entry mapping a target id to a display label.
TimelineView
Bucketed fight timeline with DPS series and event windows.
TournamentStatsView
Headline tournament stats: winner vs baseline DPS, phases completed, totals.
TournamentView
Chart-ready view model for a finalized tournament job.
UnitMapEntry
Collision-free tagged unit dictionary entry.

Enums§

AnalyticsDecodeStage
Protobuf or validation stage that rejected an analytics payload.
JobResultView
Tagged decoded result envelope: discriminates single vs tournament vs legacy.

Functions§

decode_and_derive
Decode ResultViewV1 and TimelineViewV1 protobuf bytes into a chart-ready AnalyticsView.
decode_chunk_telemetry
Decode a single ChunkTelemetry blob into an AnalyticsView (timeline always None).
decode_job_result
Decode the JobResult + JobTimeline envelope, falling back to decode_and_derive when the oneof is unset.
emit_result_snapshot
Emit a ResultViewV1 snapshot derived from the current running state.
emit_timeline_snapshot
Emit a TimelineViewV1 snapshot derived from the current running state.
merge_chunk
Incrementally merge a ChunkTelemetry into RunningAggregateStateV1.
new_running_state
Build a zeroed RunningAggregateStateV1 sized for chunks_total chunks.
validate_chunk
Validate a chunk against the running state before merging it in.