Fix RealTimeMicroseconds ProfileEvents

RUsageCounters::real_time (RealTimeMicroseconds) was constructed from
CLOCK_REALTIME (or similar) in the ThreadStatus::initPerformanceCounters()
(ThreadStatusExt.cpp), while the intention is to store CLOCK_MONOTONIC
(time from boot, i.e. /proc/uptime) values there (in ThreadProfileEvents.h)
This commit is contained in:
Azat Khuzhin 2020-10-07 21:32:36 +03:00
parent 553f6aa4cd
commit c0e15ba348

View File

@ -171,7 +171,8 @@ void ThreadStatus::initPerformanceCounters()
query_start_time_microseconds = time_in_microseconds(now); query_start_time_microseconds = time_in_microseconds(now);
++queries_started; ++queries_started;
*last_rusage = RUsageCounters::current(query_start_time_nanoseconds); // query_start_time_nanoseconds cannot be used here since RUsageCounters expect CLOCK_MONOTONIC
*last_rusage = RUsageCounters::current();
if (query_context) if (query_context)
{ {