mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Merge pull request #67492 from jkartseva/try_fix_01923_network_receive_time_metric_insert
Disable parallel run for `01923_network_receive_time_metric_insert.sh`
This commit is contained in:
commit
b5c5ea612a
@ -1,6 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Tags: no-fasttest
|
||||
# Tags: no-fasttest, no-parallel
|
||||
# Tag no-fasttest: needs pv
|
||||
# Tag no-parallel: reads from a system table
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
@ -12,9 +13,23 @@ ${CLICKHOUSE_CLIENT} --query "DROP TABLE IF EXISTS t; CREATE TABLE t (x UInt64)
|
||||
seq 1 1000 | pv --quiet --rate-limit 400 | ${CLICKHOUSE_CLIENT} --query "INSERT INTO t FORMAT TSV"
|
||||
|
||||
# We check that the value of NetworkReceiveElapsedMicroseconds correctly includes the time spent waiting data from the client.
|
||||
${CLICKHOUSE_CLIENT} --query "SYSTEM FLUSH LOGS;
|
||||
WITH ProfileEvents['NetworkReceiveElapsedMicroseconds'] AS time
|
||||
SELECT time >= 1000000 ? 1 : time FROM system.query_log
|
||||
WHERE current_database = currentDatabase() AND query_kind = 'Insert' AND event_date >= yesterday() AND type = 2 ORDER BY event_time DESC LIMIT 1;"
|
||||
result=$(${CLICKHOUSE_CLIENT} --query "SYSTEM FLUSH LOGS;
|
||||
WITH ProfileEvents['NetworkReceiveElapsedMicroseconds'] AS elapsed_us
|
||||
SELECT elapsed_us FROM system.query_log
|
||||
WHERE current_database = currentDatabase() AND query_kind = 'Insert' AND event_date >= yesterday() AND type = 'QueryFinish'
|
||||
ORDER BY event_time DESC LIMIT 1;")
|
||||
|
||||
elapsed_us=$(echo $result | sed 's/ .*//')
|
||||
|
||||
min_elapsed_us=1000000
|
||||
if [[ "$elapsed_us" -ge "$min_elapsed_us" ]]; then
|
||||
echo 1
|
||||
else
|
||||
# Print debug info
|
||||
${CLICKHOUSE_CLIENT} --query "
|
||||
WITH ProfileEvents['NetworkReceiveElapsedMicroseconds'] AS elapsed_us
|
||||
SELECT query_start_time_microseconds, event_time_microseconds, query_duration_ms, elapsed_us, query FROM system.query_log
|
||||
WHERE current_database = currentDatabase() and event_date >= yesterday() AND type = 'QueryFinish' ORDER BY query_start_time;"
|
||||
fi
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "DROP TABLE t"
|
||||
|
Loading…
Reference in New Issue
Block a user