ClickHouse/tests/performance/README.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

68 lines
1.9 KiB
Markdown
Raw Permalink Normal View History

## ClickHouse performance tests
2024-09-25 12:43:39 +00:00
This directory contains `.xml`-files with performance tests.
2024-09-25 12:43:39 +00:00
### How to write a performance test
2024-09-25 12:43:39 +00:00
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.
2024-09-25 12:43:39 +00:00
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>
```
2023-08-17 18:00:34 +00:00
If your test takes more than 10 minutes, please, add tag `long` to have an opportunity to run all tests and skip long ones.
2019-10-14 10:13:32 +00:00
### How to run performance test
2024-09-25 12:43:39 +00:00
TODO
2020-08-26 17:34:05 +00:00
### How to validate single test
```
pip3 install clickhouse_driver scipy
2023-12-27 12:16:17 +00:00
../../tests/performance/scripts/perf.py --runs 1 insert_parallel.xml
2020-08-26 17:34:05 +00:00
```