2019-05-25 10:46:08 +00:00
## ClickHouse performance tests
This directory contains `.xml` -files with performance tests for `clickhouse-performance-test` tool.
### How to write performance test
First of all you should check existing tests don't cover your case. If there are no such tests than you should write your own.
2020-03-07 19:41:16 +00:00
You have to specify `preconditions` . It contains table names. Only `hits_100m_single` , `hits_10m_single` , `test.hits` are available in CI.
2019-05-25 10:46:08 +00:00
2020-03-07 19:41:16 +00:00
The most important part of test is `stop_conditions` . Also you should always specify `total_time_ms` metric. Endless tests will be ignored by CI.
2019-05-25 10:46:08 +00:00
You can use `substitions` , `create` , `fill` and `drop` queries to prepare test. You can find examples in this folder.
Take into account, that these tests will run in CI which consists of 56-cores and 512 RAM machines. Queries will be executed much faster than on local laptop.
2019-10-14 10:13:32 +00:00
If your test continued more than 10 minutes, please, add tag `long` to have an opportunity to run all tests and skip long ones.
2019-05-25 10:46:08 +00:00
### How to run performance test
You have to run clickhouse-server and after you can start testing:
```
$ clickhouse-performance-test --input-file my_lovely_test1.xml --input-file my_lovely_test2.xml
$ clickhouse-performance-test --input-file /my_lovely_test_dir/
```