ClickHouse/tests/queries/0_stateless/02136_scalar_progress.sh
Joe Lynch 767f2472c2
Add elapsed_ns to HTTP headers X-ClickHouse-Progress and X-ClickHouse-Summary
The TCP interface progress has this field. This is not a super accurate
measure of server side query time, but trying to measure from the client
is even worse.
2023-09-05 21:03:13 +02:00

8 lines
527 B
Bash
Executable File

#!/usr/bin/env bash
# Ref: https://github.com/ClickHouse/ClickHouse/issues/1576
CURDIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# shellcheck source=../shell_config.sh
. "$CURDIR"/../shell_config.sh
$CLICKHOUSE_CURL -sS "${CLICKHOUSE_URL}&wait_end_of_query=1&send_progress_in_http_headers=1&http_headers_progress_interval_ms=0" -d "SELECT (SELECT max(number), count(number) FROM numbers(100000) settings max_block_size=65505);" -v 2>&1 | grep -E "X-ClickHouse-Summary|X-ClickHouse-Progress" | sed 's/,\"elapsed_ns[^}]*//'