Skip to main content

Module metrics

Module metrics 

Source
Expand description

The metrics file: everything the site draws about a session, beside its replay archive.

It carries the platform’s per-turn metrics and the arena’s declared series, events, stats and result, so the site draws a replay page from this file and the declaration alone, and never decodes an arena’s frames. A series that would repeat itself is recorded on change, to keep the file small.

JSON, since the site reads it on every visit and it stays small.

Structs§

EventMark
Line
A line’s points, each (turn, value), recorded only when the value changes. A value holds until the next point.
Metrics
MetricsRecorder
Builds a metrics file turn by turn, from the arena’s reports, recording each line only on change.
SeriesTrack
One series’ values, recorded on change.
SessionResult
How a session finished.
StatValues

Constants§

METRICS_FORMAT
Bumped on any change to these types.