bench: add metrics benchmarking suite for ClickHouse and PostgreSQL - #736
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
alexbouchardd
approved these changes
Mar 9, 2026
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…anularity, filters Migrate bench suite to current metrics API (TimeRange, tenant via filters) and add bench cases for rate measures, multi-value granularities (2d/w/M), new dimensions (code, attempt_number), and new filters (code, manual, attempt_number, multi-filter). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
alexluong
force-pushed
the
metrics-bench
branch
from
March 10, 2026 18:58
ada4c8b to
b1f1c3a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Benchmarks
QueryEventMetrics/QueryAttemptMetricsagainst PG and CH.Dockerized setup with deterministic seeding, shared test cases across backends, single-iteration and sustained run modes via Makefile.
Test Setup
M1 Pro, 2 CPU per container. ~10M events, ~12.6M attempts (~22.6M total rows). March 2026.
Data: 2 tenants (
tenant_090%,tenant_110%), 500 destinations, 3 topics, events spread across Jan 2000, chained retries (1 event → 1-4 attempts), 0.5% permanently failed.Results — Single Iteration (benchtime=1x)
Event Metrics (~9M rows for tenant_0)
Attempt Metrics (~10M rows for tenant_0)
Results — Sustained Load (benchtime=10s, count=3)
CH 8GB vs PG 8GB — Head-to-Head (Attempts)
PG 4GB — Sustained Degradation
PG at 4GB degraded significantly under sustained load (cache thrashing). Heavy queries drifted +29% to +104% across runs. At 8GB PG stabilized with 2.6-5.9x improvement on heavy queries.
Key Findings
uniqExactIfdedup tax from ReplacingMergeTree. Still competitive under sustained load.🤖 Generated with Claude Code