mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
A couple of tests
This commit is contained in:
parent
c762e2247d
commit
1960c717ed
@ -0,0 +1 @@
|
||||
1
|
16
tests/queries/0_stateless/01939_network_receive_bytes_metrics.sh
Executable file
16
tests/queries/0_stateless/01939_network_receive_bytes_metrics.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
${CLICKHOUSE_CLIENT} --multiquery --query "DROP TABLE IF EXISTS t; CREATE TABLE t (x UInt64) ENGINE = Memory;"
|
||||
|
||||
seq 1 1000 | ${CLICKHOUSE_CLIENT} --query "INSERT INTO t FORMAT TSV"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --multiquery --query "SYSTEM FLUSH LOGS;
|
||||
WITH ProfileEvents['NetworkReceiveBytes'] AS bytes
|
||||
SELECT bytes >= 8000 AND bytes < 9000 ? 1 : bytes 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;"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "DROP TABLE t"
|
@ -0,0 +1 @@
|
||||
1
|
16
tests/queries/0_stateless/01939_network_send_bytes_metrics.sh
Executable file
16
tests/queries/0_stateless/01939_network_send_bytes_metrics.sh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
|
||||
# shellcheck source=../shell_config.sh
|
||||
. "$CURDIR"/../shell_config.sh
|
||||
|
||||
${CLICKHOUSE_CLIENT} --multiquery --query "DROP TABLE IF EXISTS t; CREATE TABLE t (x UInt64) ENGINE = Memory;"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "SELECT number FROM numbers(1000)" > /dev/null
|
||||
|
||||
${CLICKHOUSE_CLIENT} --multiquery --query "SYSTEM FLUSH LOGS;
|
||||
WITH ProfileEvents['NetworkSendBytes'] AS bytes
|
||||
SELECT bytes >= 8000 AND bytes < 9000 ? 1 : bytes FROM system.query_log
|
||||
WHERE current_database = currentDatabase() AND query_kind = 'Select' AND event_date >= yesterday() AND type = 2 ORDER BY event_time DESC LIMIT 1;"
|
||||
|
||||
${CLICKHOUSE_CLIENT} --query "DROP TABLE t"
|
Loading…
Reference in New Issue
Block a user