stack/apps
Bilal Godil 81c84289b8 perf(platform-analytics): cut ClickHouse query peak memory
Reduce the worst-case concurrent ClickHouse memory of the internal
platform-analytics route (all 17 CH queries fire in one Promise.all on
the shared admin user, against a 9 GB per-user cap).

- Use sipHash64(user_id) as the distinct key in the uniqExact/uniqExactIf
  aggregates (dauSeries, sparkByProject, mauProjects, activeByProject).
  Exact at this scale (64-bit, negligible collision prob over 1M users),
  verified byte-identical; -40% to -61% peak memory per query.
- Sample the new/retained/reactivated activity split at 1-in-4 users
  (consistent cityHash bucket on both subqueries, counts scaled x4). The
  split's window function + all-history scan made it the heaviest query
  (~1.3 GiB at 1M users / 50M events); sampling cuts it ~78% for a ~0.4%
  mean error. Dashboard chart now notes it is a sampled estimate.

Adds the benchmark/optimization harnesses used to validate these changes
(seed isolated bench_pa DBs, measure peak memory, verify result equality).
2026-06-19 10:54:37 -07:00
..
backend perf(platform-analytics): cut ClickHouse query peak memory 2026-06-19 10:54:37 -07:00
dashboard perf(platform-analytics): cut ClickHouse query peak memory 2026-06-19 10:54:37 -07:00
dev-launchpad chore: update package versions 2026-06-17 20:31:22 +00:00
e2e User ID filter for email outbox 2026-06-17 13:39:26 -07:00
hosted-components chore: update package versions 2026-06-17 20:31:22 +00:00
internal-tool add platform analytics route to the dashboard 2026-06-18 16:53:03 -07:00
mcp add platform analytics route to the dashboard 2026-06-18 16:53:03 -07:00
mock-oauth-server chore: update package versions 2026-06-17 20:31:22 +00:00
oauth-mock-server In-source unit tests (#429) 2025-02-14 11:47:52 -08:00
skills add platform analytics route to the dashboard 2026-06-18 16:53:03 -07:00