diff options
-rw-r--r-- | it_dbi.class | 3 |
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; |