Repository navigation
Make the rand performance test call the functions it measures - #131157
Conversation
The four queries of `rand.xml` have the shape `SELECT count() FROM (SELECT f() FROM zeros(N))`. `count()` reads no column of the subquery, so the projection is dropped and `f()` is never called: in CI `FunctionExecute` is 0 in every run of all four queries on both architectures, and the queries time `count()` over `zeros()` (4-8 ms for queries 2 and 3), which is noise. This started with the analyzer becoming the default (ClickHouse#61652): on master `rand ClickHouse#2` went from 246 ms on 2024-03-26 to 6.3 ms on 2024-03-27. Performance test queries keep their numbers, so queries 0-3 are disabled (`disabled="1"`, text unchanged) and queries 4-7 are appended in the `WHERE NOT ignore(f())` form used by `random_string.xml` and `synthetic_hardware_benchmark.xml`, with the same row counts. `ignore` is never constant-folded, so its argument is computed for every row. Related: ClickHouse#110105, ClickHouse#101039 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Internal second-model review: adjudication log (click to expand)Pre-publication review by an independent model (engine: codex; 1 finding) plus my own review (1 nit).
Severity: ❌ blocker / Session id: cron:clickhouse-review-slot-10:20261112-234200 |
|
cc @Algunenano, could you review this? Make the rand performance test call the functions it measures: queries 0-3 never called rand/rand64/randUniform/generateUUIDv4, so they are disabled and replaced by WHERE NOT ignore(f()) queries |
Pre-PR validation gate (click to expand)
Session id: cron:clickhouse-impl-slot-7:20261112-232400 |
|
Workflow [PR], commit [e8d2163] Summary: ✅
AI ReviewSummaryPR #131157 at Missing context / blind spots
Final VerdictStatus: ✅ Approve. |
7d943bb
Related: #110105
Related: #101039
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
...
Description
rand #2turnedPerformance Comparison (arm_release, master_head, 3/6)red on #110105 (6.4 -> 8.1 ms), andrand #3did the same on #101039. Neither PR touches these functions.The four queries are
SELECT count() FROM (SELECT f() FROM zeros(N)).count()reads no column of the subquery, so the plan is onlyReadFromStorage (SystemZeros)->Aggregating, andrand,rand64,randUniformandgenerateUUIDv4are never called. In CI,FunctionExecuteis 0 in every run of all four queries on both architectures: the test timescount()overzeros(). This started when the analyzer became the default (#61652). On master,rand #2went from 246 ms on 2024-03-26 to 6.3 ms on 2024-03-27.Queries 0-3 get
disabled="1", which keeps their numbers and text. Queries 4-7 run the same functions with the same row counts asSELECT count() FROM zeros(N) WHERE NOT ignore(f()), the form used byrandom_string.xmlandsynthetic_hardware_benchmark.xml.ignoreis not constant-folded, so its argument is computed for every row. The new queries have no master history yet.Validation (x86, amd_release of the base commit):
perf.py --print-querieskeeps 0-3 byte-identical.system.query_logshowsFunctionExecute0 for 0-3 and 4587-45867 for 4-7.perf.pyruns with the CI flags, both servers pinned to the same 8 cores, skip 0-3 and time 4-7 at 66-217 ms. The two servers agree within 1.5%. In the same setup, master's queries 0-3 move by up to 10.1%.highlight #0/#1anddistributed_aggregation #0have the same prunedcount()shape. They are not changed here.🤖 Generated with Claude Code
Workflow [PR]
Sync PR [sync-upstream/pr/131157]
Version info
26.11.1.2176-master(included in26.11and later)