Commit Graph

11 Commits

Author SHA1 Message Date
rcourtman 2b3295e6f0 Speed up workload charts with TTL cache and remove redundant clones
handleWorkloadCharts: add a 3s TTL response cache + per-key singleflight
so repeated sparkline polls from dashboards share work. TestSLO_WorkloadCharts
p95 drops from 188ms (over the 90ms target) to 838µs because most polls
hit cache or coalesce. Cold-call cost is unchanged; the win is dedup of
the steady-state polling pattern.

Cache + singleflight state live on the Router struct, not as globals, so
tenants don't cross-contaminate and tests don't pollute each other. Same
treatment for stateComputeGroup added in the previous commit.

monitor_metrics.mergeMetricHistory: drop the defensive cloneMetricPointMap
of base and cloneMetricSeries of candidate inside the merge. Every caller
already passes a freshly-owned map (from filterChartMetricMap,
GetAllGuestMetrics, GetAllStorageMetrics, queryStore*), so the internal
clones were pure waste. Caller-side cloneMetricPointMap is removed in
the three sites where the input is owned. ~6% allocation reduction on
BenchmarkHandleWorkloadCharts_StoreBacked.

Contract-neutral: no endpoint, response body, header, or wire-format
change.
2026-05-25 20:35:58 +01:00
rcourtman 0c8628c23e Warm Workloads route and chart caches 2026-04-29 18:02:30 +01:00
rcourtman 1e28a03b57 Stabilize rc1 mock mode and metrics history 2026-04-11 16:47:37 +01:00
rcourtman 347a013e79 Stabilize RC release proof contracts 2026-04-11 14:51:10 +01:00
rcourtman 4ca488101e Optimize compact storage summary chart path 2026-04-10 19:09:12 +01:00
rcourtman 4692d88a0d Speed up demo mock chart loading 2026-04-10 14:26:55 +01:00
rcourtman 1bde5976a0 Route physical disk drawer IO through canonical history 2026-04-01 23:33:43 +01:00
rcourtman 83f4b28b3a Canonicalize mock chart history continuity 2026-04-01 20:41:56 +01:00
rcourtman 65d386bbd9 feat(truenas): add native host chart fallback 2026-03-29 21:35:05 +01:00
rcourtman a71f370731 feat(truenas): add native disk chart fallback 2026-03-29 21:17:51 +01:00
rcourtman 778a2577b6 feat: Pulse v6 release 2026-03-18 16:06:30 +00:00