Make trace_log test to pass

This commit is contained in:
bharatnc 2020-09-15 17:12:06 -07:00 committed by alesapin
parent eb24d19cd4
commit 83fda9fe58
2 changed files with 4 additions and 13 deletions

View File

@ -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;

View File

@ -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