Commit f8bb99bf authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

MDEV-32841 Use chrono::duration<double> instead of chrono::duration<float>

Requested by Marko during review
parent 01466adc
......@@ -121,7 +121,7 @@ class io_slots
return m_cache.pos();
}
std::chrono::duration<float> wait_time()
std::chrono::duration<double> wait_time()
{
return m_cache.wait_time();
}
......@@ -167,9 +167,7 @@ void innodb_io_slots_stats(tpool::aio_opcode op, innodb_async_io_stats_t *stats)
io_slots *slots= op == tpool::aio_opcode::AIO_PREAD? read_slots : write_slots;
stats->pending_ops = slots->pending_io_count();
stats->slot_wait_time_sec=
std::chrono::duration_cast<std::chrono::duration<float>>(
slots->wait_time()).count();
stats->slot_wait_time_sec= slots->wait_time().count();
slots->task_group().get_stats(&stats->completion_stats);
}
......
......@@ -86,7 +86,7 @@ template<typename T, bool timed=false> class cache
Total time spent waiting on entries in cache, inside get()
Only valid if timed template parameter is true.
*/
std::chrono::duration<float> m_wait_time;
std::chrono::duration<double> m_wait_time;
private:
......@@ -205,7 +205,7 @@ template<typename T, bool timed=false> class cache
return m_pos;
}
TPOOL_SUPPRESS_TSAN std::chrono::duration<float> wait_time()
TPOOL_SUPPRESS_TSAN std::chrono::duration<double> wait_time()
{
return m_wait_time;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment