Update performance README

This commit is contained in:
Robert Schulze 2024-09-25 12:43:39 +00:00
parent 459d9cae66
commit 506bf5dc24
No known key found for this signature in database
GPG Key ID: 26703B55FB13728A

View File

@ -1,18 +1,63 @@
## ClickHouse performance tests
This directory contains `.xml`-files with performance tests for @akuzm tool.
This directory contains `.xml`-files with performance tests.
### How to write performance test
### How to write a performance test
First of all you should check existing tests don't cover your case. If there are no such tests then you should write your own.
First of all please check that existing tests don't cover your case. If there are no such tests then you can write your own test.
You can use `substitions`, `create`, `fill` and `drop` queries to prepare test. You can find examples in this folder.
Test template:
``` xml
<test>
<!-- Optional: Specify settings -->
<settings>
<max_threads>1</max_threads>
<max_insert_threads>1</max_insert_threads>
</settings>
<!-- Optional: Variable substitutions, can be referenced to by curly brackets {} and used in any queries -->
<substitutions>
<substitution>
<name>x</name>
<values>
<value>10</value>
<value>50</value>
</values>
</substitution>
<substitution>
<name>y</name>
<values>
<value>5</value>
<value>8</value>
</values>
</substitution>
</substitutions>
<!-- Optional: Table setup queries -->
<create_query>CREATE TABLE tab1 [..]</create_query>
<create_query>CREATE TABLE tab2 [..]</create_query>
<!-- Optional: Table population queries -->
<fill_query>INSERT INTO tab1 [...]</fill_query>
<fill_query>INSERT INTO tab2 [...]</fill_query>
<!-- Benchmark queries -->
<query>SELECT [...] WHERE col BETWEEN {x} AND {y}</query>
<query>SELECT [...]</query>
<query>SELECT [...]</query>
<!-- Optional: Table teardown queries -->
<drop_query>DROP TABLE tab1</drop_query>
<drop_query>DROP TABLE tab2</drop_query>
</test>
```
If your test takes more than 10 minutes, please, add tag `long` to have an opportunity to run all tests and skip long ones.
### How to run performance test
TODO @akuzm
TODO
### How to validate single test