mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Make trace_log test to pass
This commit is contained in:
parent
b27579e3f7
commit
4f8266c7a1
@ -318,17 +318,6 @@ void ThreadStatus::detachQuery(bool exit_if_already_detached, bool thread_exits)
|
||||
#endif
|
||||
}
|
||||
|
||||
inline UInt64 time_in_microseconds(std::chrono::time_point<std::chrono::system_clock> timepoint)
|
||||
{
|
||||
return std::chrono::duration_cast<std::chrono::microseconds>(timepoint.time_since_epoch()).count();
|
||||
}
|
||||
|
||||
|
||||
inline UInt64 time_in_seconds(std::chrono::time_point<std::chrono::system_clock> timepoint)
|
||||
{
|
||||
return std::chrono::duration_cast<std::chrono::seconds>(timepoint.time_since_epoch()).count();
|
||||
}
|
||||
|
||||
void ThreadStatus::logToQueryThreadLog(QueryThreadLog & thread_log)
|
||||
{
|
||||
QueryThreadLogElement elem;
|
||||
|
@ -25,11 +25,13 @@ SELECT if(dateDiff('second', toDateTime(time_with_microseconds), toDateTime(time
|
||||
|
||||
SELECT '01473_trace_log_table_event_start_time_microseconds_test';
|
||||
SET log_queries = 1;
|
||||
SET query_profiler_real_time_period_ns = 0;
|
||||
SET query_profiler_cpu_time_period_ns = 1000000;
|
||||
SET query_profiler_real_time_period_ns = 10000000;
|
||||
SET query_profiler_cpu_time_period_ns = 10000000;
|
||||
-- a long enough query to trigger the query profiler and to record trace log
|
||||
SELECT count() FROM numbers(1000000000) FORMAT Null;
|
||||
SELECT sleep(2) FORMAT Null;
|
||||
SYSTEM FLUSH LOGS;
|
||||
SELECT sleep(2) FORMAT Null;
|
||||
WITH (
|
||||
(
|
||||
SELECT event_time_microseconds
|
||||
|
Loading…
Reference in New Issue
Block a user