2022-11-24 19:54:39 +00:00
|
|
|
#!/usr/bin/env bash
|
2022-11-30 17:31:35 +00:00
|
|
|
# Tags: no-tsan, no-parallel
|
2022-11-24 19:54:39 +00:00
|
|
|
|
|
|
|
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
|
|
|
# shellcheck source=../shell_config.sh
|
|
|
|
. "$CUR_DIR"/../shell_config.sh
|
|
|
|
|
2022-11-25 03:06:55 +00:00
|
|
|
query_id="$RANDOM-$CLICKHOUSE_DATABASE"
|
2022-11-24 19:54:39 +00:00
|
|
|
${CLICKHOUSE_CLIENT} --query_id $query_id --query "SELECT 1 FORMAT Null SETTINGS trace_profile_events = 0"
|
|
|
|
|
|
|
|
${CLICKHOUSE_CLIENT} --query "SYSTEM FLUSH LOGS"
|
|
|
|
${CLICKHOUSE_CLIENT} --query "SELECT count() = 0 FROM system.trace_log WHERE query_id = '$query_id' AND trace_type = 'ProfileEvent'"
|
|
|
|
|
2022-11-25 03:06:55 +00:00
|
|
|
query_id="$RANDOM-$CLICKHOUSE_DATABASE"
|
2022-11-24 19:54:39 +00:00
|
|
|
${CLICKHOUSE_CLIENT} --query_id $query_id --query "SELECT 1 FORMAT Null SETTINGS trace_profile_events = 1"
|
|
|
|
|
|
|
|
${CLICKHOUSE_CLIENT} --query "SYSTEM FLUSH LOGS"
|
|
|
|
${CLICKHOUSE_CLIENT} --query "SELECT count() > 0, sum(empty(trace)) = 0 FROM system.trace_log WHERE query_id = '$query_id' AND trace_type = 'ProfileEvent'"
|