From e5b67a46bcb75a751f5906f19694971bc803d67c Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Thu, 23 Mar 2017 11:48:56 +0000 Subject: MDEV-12345 Performance : replace calls to clock() inside trx_start_low() by THD::start_utime --- storage/innobase/handler/ha_innodb.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'storage/innobase/handler/ha_innodb.h') diff --git a/storage/innobase/handler/ha_innodb.h b/storage/innobase/handler/ha_innodb.h index 478187e0b23..90dfb6102b3 100644 --- a/storage/innobase/handler/ha_innodb.h +++ b/storage/innobase/handler/ha_innodb.h @@ -420,6 +420,15 @@ int thd_slave_thread(const MYSQL_THD thd); */ int thd_non_transactional_update(const MYSQL_THD thd); +/** + Get high resolution timestamp for the current query start time. + The timestamp is not anchored to any specific point in time, + but can be used for comparison. + + @retval timestamp in microseconds precision +*/ +unsigned long long thd_start_utime(const MYSQL_THD thd); + /** Get the user thread's binary logging format @param thd user thread -- cgit v1.2.1