mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Improve performance-test docker image
This commit is contained in:
parent
346adf896f
commit
1f95bf18e4
15
docker/test/performance/Dockerfile
Normal file
15
docker/test/performance/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
||||
FROM yandex/clickhouse-stateful-test
|
||||
|
||||
RUN apt-get update -y \
|
||||
&& env DEBIAN_FRONTEND=noninteractive \
|
||||
apt-get install --yes --no-install-recommends \
|
||||
python-requests
|
||||
|
||||
COPY s3downloader /s3downloader
|
||||
COPY run.sh /run.sh
|
||||
|
||||
ENV OPEN_DATASETS="hits"
|
||||
ENV PRIVATE_DATASETS="hits_100m_single"
|
||||
ENV DOWNLOAD_DATASETS=1
|
||||
|
||||
CMD /run.sh
|
33
docker/test/performance/run.sh
Executable file
33
docker/test/performance/run.sh
Executable file
@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -x
|
||||
|
||||
install_packages() {
|
||||
dpkg -i package_folder/clickhouse-common-static_*.deb
|
||||
dpkg -i package_folder/clickhouse-server_*.deb
|
||||
dpkg -i package_folder/clickhouse-client_*.deb
|
||||
dpkg -i package_folder/clickhouse-test_*.deb
|
||||
service clickhouse-server start && sleep 5
|
||||
}
|
||||
|
||||
download_data() {
|
||||
clickhouse-client --query "CREATE DATABASE IF NOT EXISTS datasets"
|
||||
clickhouse-client --query "CREATE DATABASE IF NOT EXISTS test"
|
||||
/s3downloader --dataset-names $OPEN_DATASETS
|
||||
/s3downloader --dataset-names $PRIVATE_DATASETS --url 'https://s3.mds.yandex.net/clickhouse-private-datasets'
|
||||
chmod 777 -R /var/lib/clickhouse
|
||||
service clickhouse-server restart && sleep 5
|
||||
clickhouse-client --query "RENAME TABLE datasets.hits_v1 TO test.hits"
|
||||
}
|
||||
|
||||
run() {
|
||||
clickhouse-performance-test $TESTS_TO_RUN | tee test_output/test_result.json
|
||||
}
|
||||
|
||||
install_packages
|
||||
|
||||
if [ $DOWNLOAD_DATASETS -eq 1 ]; then
|
||||
download_data
|
||||
fi
|
||||
|
||||
run
|
Loading…
Reference in New Issue
Block a user