From bd653f3a1b385892186cb9fca491ee9ec5e9bbed Mon Sep 17 00:00:00 2001 From: Urban Müller Date: Fri, 27 Nov 2020 18:20:44 +0100 Subject: log write throttles --- it_dbi.class | 3 +++ 1 file changed, 3 insertions(+) (limited to 'it_dbi.class') diff --git a/it_dbi.class b/it_dbi.class index 32ae831..344976a 100644 --- a/it_dbi.class +++ b/it_dbi.class @@ -604,7 +604,10 @@ function query($query, $p = array()) } if ($writing && $this->_p['throttle_writes']) + { + it::log('debug', 'dbi-throttle', 1000000 * (gettimeofday(true) - $start) * $this->_p['throttle_writes']); usleep(1000000 * (gettimeofday(true) - $start) * $this->_p['throttle_writes']); + } $msec = round(1000 * (gettimeofday(true) - $start)); $slow = $msec >= 2000; -- cgit v1.2.3