mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #38723 from ClickHouse/hardware-benchmark-example-query
Add example query to hardware benchmark
This commit is contained in:
commit
4d9e3469d0
@ -217,4 +217,31 @@ TO benchmark;
|
||||
GRANT INSERT ON benchmark_runs TO benchmark;
|
||||
GRANT INSERT ON benchmark_results TO benchmark;
|
||||
|
||||
Example query:
|
||||
|
||||
SELECT
|
||||
cpu_model,
|
||||
threads,
|
||||
instance,
|
||||
k
|
||||
FROM
|
||||
(
|
||||
SELECT
|
||||
run_id,
|
||||
exp(avg(log(adjusted_time / best_time))) AS k
|
||||
FROM
|
||||
(
|
||||
WITH greatest(time, 0.01) AS adjusted_time
|
||||
SELECT
|
||||
run_id,
|
||||
adjusted_time,
|
||||
min(adjusted_time) OVER (PARTITION BY query_num, try_num) AS best_time
|
||||
FROM benchmark_results
|
||||
WHERE try_num > 1
|
||||
)
|
||||
GROUP BY run_id
|
||||
ORDER BY k ASC
|
||||
) AS t
|
||||
INNER JOIN benchmark_runs USING (run_id)
|
||||
|
||||
////
|
||||
|
Loading…
Reference in New Issue
Block a user