perf(console): 24 h bars from the hourly aggregate
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 7m5s
ci / test (pull_request) Successful in 13m31s
ci / build (pull_request) Successful in 10m50s
ci / image (pull_request) Successful in 5m30s

The default range bucketed raw results by 30 minutes: for the hundred or
so monitors a dashboard shows, half a million rows on every request. It
shows 24 hourly bars from the real-time hourly aggregate now (bars 150-230
ms to 18 ms locally, the page 570 KB to 335 KB for 3,500 monitors).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
This commit is contained in:
Sebastian UnterschützandClaude Opus 5.5 committed 2026-11-26 21:49:50 +01:00
1 parent ec33ef5c56
commit 4fd11cb45b
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -54,7 +54,7 @@ func TestTimeRangesAndSLA(t *testing.T) {
}
}
bars := map[string]int{"1h": 60, "3h": 36, "12h": 48, "24h": 48, "7d": 42, "30d": 60, "90d": 45, "180d": 45, "1y": 52}
bars := map[string]int{"1h": 60, "3h": 36, "12h": 48, "24h": 24, "7d": 42, "30d": 60, "90d": 45, "180d": 45, "1y": 52}
for key, n := range bars {
st, _, html := owner.page("/?range=" + key)
if st != http.StatusOK {
+1 -1
View File
@@ -33,7 +33,7 @@ var Ranges = []TimeRange{
{Key: "1h", Window: time.Hour, Bucket: time.Minute, Layout: "15:04"},
{Key: "3h", Window: 3 * time.Hour, Bucket: 5 * time.Minute, Layout: "15:04"},
{Key: "12h", Window: 12 * time.Hour, Bucket: 15 * time.Minute, Layout: "15:04"},
{Key: "24h", Window: day, Bucket: 30 * time.Minute, Layout: "01-02 15:04"},
{Key: "24h", Window: day, Bucket: time.Hour, Source: SourceHourly, Layout: "01-02 15:04"},
{Key: "7d", Window: 7 * day, Bucket: 4 * time.Hour, Source: SourceHourly, Layout: "01-02 15:04"},
{Key: "30d", Window: 30 * day, Bucket: 12 * time.Hour, Source: SourceHourly, Layout: "2006-01-02 15:04"},
{Key: "90d", Window: 90 * day, Bucket: 2 * day, Source: SourceDaily, Layout: "2006-01-02"},