Default mock trend seeding to 48h instead of 90 days

Mock mode seeded 90 days of synthetic history for every resource at
startup. Measured on the demo droplet with identical entity counts, that
put the process near 1GB of Go heap before the first tick; a 6h seed
runs at ~200MB. Every local dev instance and CI run in mock mode paid
that gigabyte silently, and on 1GB hosts it OOMed the box.

48h keeps day-scale charts fully populated. Long-range chart work opts
in with PULSE_MOCK_TRENDS_SEED_DURATION, which is how the public demo
already pins its own seed (6h).

Contract-Neutral: mock seed default resize: dev-only mock path, no contract delta
This commit is contained in:
rcourtman
2026-08-05 14:04:18 +01:00
parent a3d63e08b6
commit 9a7afbd2eb
+7 -1
View File
@@ -22,7 +22,13 @@ import (
)
const (
defaultMockSeedDuration = 90 * 24 * time.Hour
// defaultMockSeedDuration bounds how much synthetic trend history mock
// mode seeds at startup. Measured on the demo droplet (identical entity
// counts): a 90-day seed put the process near 1GB of heap before the
// first real tick, a 6h seed at ~200MB. 48h keeps day-scale charts fully
// populated; anyone exercising long-range charts opts into more via
// PULSE_MOCK_TRENDS_SEED_DURATION.
defaultMockSeedDuration = 48 * time.Hour
defaultMockSampleInterval = 1 * time.Minute // 1m for detailed recent charts
)