tests: remove unused stress script

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-07-03 14:24:35 +03:00
parent 769017e1f5
commit f1eec0b6e8

View File

@ -1,23 +0,0 @@
#!/usr/bin/env bash
# https://stackoverflow.com/questions/360201/how-do-i-kill-background-processes-jobs-when-my-shell-script-exits
trap 'kill -9 $(jobs -p)' EXIT
function thread()
{
while true; do
./clickhouse-test --client-option="query-fuzzer-runs=10" --order random 2>&1 | awk '/^\w+:/ { printf("\033[0;%s%sm \033[0m", ('$1' % 2 ? "4" : "10"), (int('$1' / 2) % 8)) }'
done
}
# https://stackoverflow.com/questions/9954794/execute-a-shell-function-with-timeout
export -f thread;
NUM_THREADS=${1:-"16"}
TIMEOUT=${2:-"300"}
for i in $(seq 1 $NUM_THREADS); do
timeout $TIMEOUT bash -c "thread $i" 2> /dev/null &
done
wait