From 668a21b94f18091ee12d5112baeca36382eea2e7 Mon Sep 17 00:00:00 2001 From: Alexey Milovidov Date: Sun, 10 May 2020 05:25:32 +0300 Subject: [PATCH] Remove racy part of performance-introspection test --- ...rmance_introspection_and_logging.reference | 2 -- ...4_performance_introspection_and_logging.sh | 27 ------------------- 2 files changed, 29 deletions(-) diff --git a/tests/queries/0_stateless/00634_performance_introspection_and_logging.reference b/tests/queries/0_stateless/00634_performance_introspection_and_logging.reference index 8c3fc467d57..68134bde7c4 100644 --- a/tests/queries/0_stateless/00634_performance_introspection_and_logging.reference +++ b/tests/queries/0_stateless/00634_performance_introspection_and_logging.reference @@ -1,5 +1,3 @@ 1000 0 1 1 1 -0 -1 1 diff --git a/tests/queries/0_stateless/00634_performance_introspection_and_logging.sh b/tests/queries/0_stateless/00634_performance_introspection_and_logging.sh index 15961eac73f..21014b56b67 100755 --- a/tests/queries/0_stateless/00634_performance_introspection_and_logging.sh +++ b/tests/queries/0_stateless/00634_performance_introspection_and_logging.sh @@ -50,33 +50,6 @@ SELECT (SELECT * FROM system.query_log PREWHERE query='$heavy_cpu_query' WHERE event_date >= today()-1 AND type=2 ORDER BY event_time DESC LIMIT 1) ARRAY JOIN ProfileEvents.Names AS PN, ProfileEvents.Values AS PV" - -# Check ProfileEvents in query_thread_log - -$CLICKHOUSE_CLIENT $settings --max_threads=3 -q "$heavy_cpu_query" -$CLICKHOUSE_CLIENT $settings -q "SYSTEM FLUSH LOGS" -query_id=`$CLICKHOUSE_CLIENT $settings -q "SELECT query_id FROM system.query_log WHERE event_date >= today()-1 AND type=2 AND query='$heavy_cpu_query' ORDER BY event_time DESC LIMIT 1"` -query_elapsed=`$CLICKHOUSE_CLIENT $settings -q "SELECT query_duration_ms*1000 FROM system.query_log WHERE event_date >= today()-1 AND type=2 AND query_id='$query_id' ORDER BY event_time DESC LIMIT 1"` -threads=`$CLICKHOUSE_CLIENT $settings -q "SELECT length(thread_ids) FROM system.query_log WHERE event_date >= today()-1 AND type=2 AND query_id='$query_id' ORDER BY event_time DESC LIMIT 1"` - -$CLICKHOUSE_CLIENT $settings -q " -SELECT - -- max(thread_realtime), $query_elapsed, max(thread_time_user_system_io), - 0.9 * $query_elapsed <= max(thread_realtime) AND max(thread_realtime) <= 1.1 * $query_elapsed, - uniqExact(thread_id) = $threads -FROM -( - SELECT - thread_id, - sumIf(PV, PN = 'RealTimeMicroseconds') AS thread_realtime, - sumIf(PV, PN IN ('UserTimeMicroseconds', 'SystemTimeMicroseconds', 'OSIOWaitMicroseconds', 'OSCPUWaitMicroseconds')) AS thread_time_user_system_io - FROM - (SELECT * FROM system.query_thread_log PREWHERE query_id='$query_id' WHERE event_date >= today()-1) - ARRAY JOIN ProfileEvents.Names AS PN, ProfileEvents.Values AS PV - GROUP BY thread_id -) -" - # Check per-thread and per-query ProfileEvents consistency $CLICKHOUSE_CLIENT $settings --any_join_distinct_right_table_keys=1 -q "