DRAFT Test aggmetrics3 - #25237
Conversation
- Added harness implementation: - `benchmarks/sql_benchmarks/array_agg_distinct/array_agg_distinct.suite` – defines the benchmark suite, test parameters, and execution configuration for the data‑free SQL harness. - `benchmarks/sql_benchmarks/array_agg_distinct/benchmarks/q01.benchmark` – contains the specific query benchmark (`q01`) that exercises the `array_agg(DISTINCT …)` workload without requiring any input data. - Workload characteristics: - Simulates **2 M range rows** → **1 M groups**. - Each group contains **2 rows** with **2 distinct values**, providing a realistic yet data‑free test scenario for aggregation performance. - add bench.sh wrapper for array_agg_distinct
Reduce the data-free grouped array_agg(DISTINCT) workload while preserving its two-rows-per-group and two-distinct-values-per-group shape.
|
run benchmark sql env:
CARGO_BUILD_JOBS: 1
BENCH_NAME: array_agg_distinct
BENCH_QUERY: 1
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9" |
|
run benchmark groups_accumulator_adapter nth_value percentile_cont env:
CARGO_BUILD_JOBS: 1
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9" |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark sql
env:
BENCH_NAME: "array_agg_distinct"
BENCH_QUERY: "1"
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark percentile_cont
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark nth_value
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark groups_accumulator_adapter
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark groups_accumulator_adapter
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"CPU Details (lscpu)Details
Resource Usagegroups_accumulator_adapter — base (merge-base)
groups_accumulator_adapter — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark percentile_cont
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"CPU Details (lscpu)Details
Resource Usagepercentile_cont — base (merge-base)
percentile_cont — branch
File an issue against this benchmark runner |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #25237 +/- ##
==========================================
+ Coverage 81.90% 81.92% +0.01%
==========================================
Files 1134 1134
Lines 425261 426481 +1220
Branches 425261 426481 +1220
==========================================
+ Hits 348325 349398 +1073
- Misses 56295 56366 +71
- Partials 20641 20717 +76 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark nth_value
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"CPU Details (lscpu)Details
Resource Usagenth_value — base (merge-base)
nth_value — branch
File an issue against this benchmark runner |
|
run benchmark groups_accumulator_adapter env:
CARGO_BUILD_JOBS: 1
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9" |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark groups_accumulator_adapter
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark groups_accumulator_adapter
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"CPU Details (lscpu)Details
Resource Usagegroups_accumulator_adapter — base (merge-base)
groups_accumulator_adapter — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark sql
env:
BENCH_NAME: "array_agg_distinct"
BENCH_QUERY: "1"
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"CPU Details (lscpu)Details
Resource Usagesql — base (merge-base)
sql — branch
File an issue against this benchmark runner |
|
run benchmark sql env:
BENCH_NAME: "array_agg_distinct"
BENCH_QUERY: "1"
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9" |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing e4b81f9 (e4b81f9) to 2bc3a3f diff Run configurationrun benchmark sql
env:
BENCH_NAME: "array_agg_distinct"
BENCH_QUERY: "1"
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "e4b81f9"Results will be posted here when complete File an issue against this benchmark runner |
|
run benchmark groups_accumulator_adapter nth_value percentile_cont env:
CARGO_BUILD_JOBS: 1
baseline:
ref: "2bc3a3f"
changed:
ref: "9b4e95b" |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing 9b4e95b (9b4e95b) to 2bc3a3f diff Run configurationrun benchmark percentile_cont
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "9b4e95b"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing 9b4e95b (9b4e95b) to 2bc3a3f diff Run configurationrun benchmark nth_value
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "9b4e95b"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing 9b4e95b (9b4e95b) to 2bc3a3f diff Run configurationrun benchmark groups_accumulator_adapter
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "9b4e95b"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing 9b4e95b (9b4e95b) to 2bc3a3f diff Run configurationrun benchmark groups_accumulator_adapter
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "9b4e95b"CPU Details (lscpu)Details
Resource Usagegroups_accumulator_adapter — base (merge-base)
groups_accumulator_adapter — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing 9b4e95b (9b4e95b) to 2bc3a3f diff Run configurationrun benchmark percentile_cont
env:
CARGO_BUILD_JOBS: "1"
baseline:
ref: "2bc3a3f"
changed:
ref: "9b4e95b"CPU Details (lscpu)Details
Resource Usagepercentile_cont — base (merge-base)
percentile_cont — branch
File an issue against this benchmark runner |
…etric-count regressions - array_agg(DISTINCT) merge: one metric timer/state batch. - convert_to_state: untimed row updates + one conversion timer. - Added metric-count regressions.
…ng, bound prep chunks, time only accumulator calls, and emit one metric update per logical batch - Preps slice/filter outside submetric timing. - Times only accumulator calls. - Bounded 64‑group prep chunks; avoids unbounded retained arrays. - One metric update per logical batch.
…pped batch updates and adds regression test **Details:** - Bounded 64‑row prep chunks for `convert_to_state`. - Timer only wraps `update_batch_grouped`. - Excludes factory, slice/filter, `state/evaluate`, and result materialization steps. - Single metric update / logical conversion batch per operation. - Added RED→GREEN filtered multi‑row state‑materialization regression test.
…s, import AggregateMetrics - **Clear conditional metric lookup** – Refactored the conditional logic that retrieves metrics, removing redundant checks and making the code path easier to follow. - **Merged adjacent metrics impl blocks** – Consolidated neighboring implementation blocks that handled similar metric types, reducing duplication and improving maintainability. - **Imported AggregateMetrics; removed qualified repeats** – Added the `AggregateMetrics` import and eliminated unnecessary fully‑qualified references throughout the codebase.
… propagate to accumulators - Updated `common.rs` to introduce a helper that constructs an `AggregateMetrics` owned by the execution context. - The helper returns an `Arc<dyn AggregateMetrics>` which is now passed to both the initial and replacement accumulator instances. - Ensures consistent metric aggregation ownership across accumulator updates, resolving the blocker.
- Internal submetrics may overlap enclosing phase timers. - They are supplementary diagnostics. - Do not add them as phase‑time breakdowns.
…handling in GroupsAccumulatorAdapter The `sizes_pre` accumulation is now performed before the timer starts, preventing adapter work from being measured as part of the aggregate duration. The inner accumulation loop now breaks early on error and uses borrowed references, improving error propagation and reducing unnecessary copies.
- Added `groups_accumulator.rs` regression test file. - Introduced a sleeping `SlowSizeAccumulator` that delays `size()` by 50 ms. - Asserts that the grouped metric excludes the 50 ms `size()` delay, confirming correct grouping behavior.
… add retry regression - Clear successful groups before propagating later-group error to prevent contaminating subsequent error handling. - Added retry regression test to catch duplicate update scenarios.
- GroupsAccumulatorAdapter: uninstrumented aggregates skip chunk/Vec path. - Removed dead `time_grouped_update`. - Timed submetric path unchanged. - `convert_to_state` unchanged.
6a5c245 to
d30fe36
Compare
|
run benchmark groups_accumulator_adapter nth_value percentile_cont baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039" |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark groups_accumulator_adapter
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark nth_value
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark percentile_cont
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark groups_accumulator_adapter
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"CPU Details (lscpu)Details
Resource Usagegroups_accumulator_adapter — base (merge-base)
groups_accumulator_adapter — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark percentile_cont
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"CPU Details (lscpu)Details
Resource Usagepercentile_cont — base (merge-base)
percentile_cont — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark nth_value
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"CPU Details (lscpu)Details
Resource Usagenth_value — base (merge-base)
nth_value — branch
File an issue against this benchmark runner |
|
run benchmark groups_accumulator_adapter nth_value percentile_cont baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039" |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark groups_accumulator_adapter
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark nth_value
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark running (GKE) | trigger CPU Details (lscpu)Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark percentile_cont
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"Results will be posted here when complete File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark groups_accumulator_adapter
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"CPU Details (lscpu)Details
Resource Usagegroups_accumulator_adapter — base (merge-base)
groups_accumulator_adapter — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark percentile_cont
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"CPU Details (lscpu)Details
Resource Usagepercentile_cont — base (merge-base)
percentile_cont — branch
File an issue against this benchmark runner |
|
🤖 Benchmark completed (GKE) | trigger Instance: Comparing d30fe36 (d30fe36) to ea83270 diff Run configurationrun benchmark nth_value
baseline:
ref: "ea83270d70"
changed:
ref: "d30fe36039"CPU Details (lscpu)Details
Resource Usagenth_value — base (merge-base)
nth_value — branch
File an issue against this benchmark runner |
Test aggmetrics
benchmark runs for #25051