mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Tune 01238_http_memory_tracking to make it more optimal
w/o the patch the test fails with, since it succeed only 512 queries.
This commit is contained in:
parent
c758567e4e
commit
9744c99f7e
@ -1 +1 @@
|
|||||||
10000
|
1000
|
||||||
|
@ -3,27 +3,17 @@
|
|||||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||||
. $CURDIR/../shell_config.sh
|
. $CURDIR/../shell_config.sh
|
||||||
|
|
||||||
# Don't even try to do run under sanitizers, since they are too slow.
|
|
||||||
${CLICKHOUSE_LOCAL} --query "SELECT max(value LIKE '%sanitize%') FROM system.build_options" | grep -q '1' && echo 'Skip test for sanitizer build' && exit
|
|
||||||
|
|
||||||
# TODO: the test can be way more optimal
|
|
||||||
|
|
||||||
set -o pipefail
|
set -o pipefail
|
||||||
|
|
||||||
function execute_null()
|
|
||||||
{
|
|
||||||
${CLICKHOUSE_CLIENT} --format Null -n "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
# This is needed to keep at least one running query for user for the time of test.
|
# This is needed to keep at least one running query for user for the time of test.
|
||||||
# (10k http queries takes 10seconds, let's run for 3x more to avoid flaps)
|
# (1k http queries takes ~1 second, let's run for 5x more to avoid flaps)
|
||||||
execute_null <<<'SELECT sleepEachRow(1) FROM numbers(30)' &
|
${CLICKHOUSE_CLIENT} --format Null -n <<<'SELECT sleepEachRow(1) FROM numbers(5)' &
|
||||||
|
|
||||||
# ignore "yes: standard output: Broken pipe"
|
# ignore "yes: standard output: Broken pipe"
|
||||||
yes 'SELECT 1' 2>/dev/null | {
|
yes 'SELECT 1' 2>/dev/null | {
|
||||||
head -n10000
|
head -n1000
|
||||||
} | {
|
} | {
|
||||||
xargs -P10000 -i ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&wait_end_of_query=1&max_memory_usage_for_user=$((10<<30))" -d '{}'
|
xargs -i ${CLICKHOUSE_CURL} -sS "${CLICKHOUSE_URL}&wait_end_of_query=1&max_memory_usage_for_user=$((1<<30))" -d '{}'
|
||||||
} | grep -x -c 1
|
} | grep -x -c 1
|
||||||
|
|
||||||
wait
|
wait
|
||||||
|
Loading…
Reference in New Issue
Block a user