Top-line dashboard metrics and bounded period comparisons.
Summary
Functions
Returns average latency across prompt-run results, or zero when unavailable.
Compares the current period with the immediately preceding period.
Compares adjacent periods ending at the supplied UTC timestamp.
Returns seven-day and thirty-day period comparisons keyed by window length.
Calculates a percentage success rate, returning 0.0 when no tests exist.
Returns total passed and failed tests across suite runs.
Counts all recorded prompt runs and suite runs.
Functions
@spec avg_latency() :: number()
Returns average latency across prompt-run results, or zero when unavailable.
@spec comparison_stats(pos_integer()) :: map()
Compares the current period with the immediately preceding period.
The period defaults to seven days. Counts, quality, cost, latency, stability, regression signals, and total-run trend are calculated with bounded period queries.
@spec comparison_stats(pos_integer(), DateTime.t()) :: map()
Compares adjacent periods ending at the supplied UTC timestamp.
@spec rolling_comparisons(DateTime.t()) :: %{required(pos_integer()) => map()}
Returns seven-day and thirty-day period comparisons keyed by window length.
Calculates a percentage success rate, returning 0.0 when no tests exist.
Returns total passed and failed tests across suite runs.
@spec total_runs() :: integer()
Counts all recorded prompt runs and suite runs.