summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2020-11-27 18:20:44 +0100
committerUrban Müller2020-11-27 18:21:14 +0100
commitbd653f3a1b385892186cb9fca491ee9ec5e9bbed (patch)
tree54236c7b16a92e9fa793afe5c5dedc166cd0e151
parent1b03f72e7edc609b326927dfebc9f3f0bd6228a1 (diff)
downloaditools-bd653f3a1b385892186cb9fca491ee9ec5e9bbed.tar.gz
itools-bd653f3a1b385892186cb9fca491ee9ec5e9bbed.tar.bz2
itools-bd653f3a1b385892186cb9fca491ee9ec5e9bbed.zip
log write throttles
-rw-r--r--it_dbi.class3
1 files changed, 3 insertions, 0 deletions
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;