Add comparison stats: failure rate %, vs-yesterday change, today total
All checks were successful
CI / build (push) Successful in 1m11s
CI / docker (push) Successful in 48s
CI / deploy (push) Successful in 37s

Stats endpoint now returns current + previous period (24h shift) values
plus today's total count. UI shows:
- Total Matches: "of 12.3K today"
- Avg Duration: arrow + % vs yesterday
- Failure Rate: percentage of errors vs total, arrow + % vs yesterday
- P99 Latency: arrow + % vs yesterday
- In-Flight: unchanged (running executions)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
hsiegeln
2026-03-14 09:29:14 +01:00
parent 7c2058ecb2
commit 3641dffecc
5 changed files with 106 additions and 15 deletions

View File

@@ -1,11 +1,17 @@
package com.cameleer3.server.core.search;
/**
* Aggregate execution statistics within a time window.
*
* @param failedCount number of failed executions
* @param avgDurationMs average duration in milliseconds
* @param p99LatencyMs 99th percentile duration in milliseconds
* @param activeCount number of currently running executions
* Aggregate execution statistics within a time window, with comparison to the
* equivalent previous period (shifted back 24 h) and a "today" total.
*/
public record ExecutionStats(long failedCount, long avgDurationMs, long p99LatencyMs, long activeCount) {}
public record ExecutionStats(
long totalCount,
long failedCount,
long avgDurationMs,
long p99LatencyMs,
long activeCount,
long totalToday,
long prevTotalCount,
long prevFailedCount,
long prevAvgDurationMs,
long prevP99LatencyMs) {}