diff options
author | Erik Johnston <erik@matrix.org> | 2015-02-09 14:45:15 +0000 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-02-09 14:45:15 +0000 |
commit | 66fde49f071d75ea8bfdfac02fd4fa6fab5a9bf4 (patch) | |
tree | 27f2059819a1cf305fd95935bd9ccbb748df072b | |
parent | Time how long we're spending on the database thread (diff) | |
download | synapse-66fde49f071d75ea8bfdfac02fd4fa6fab5a9bf4.tar.xz |
Log database time every 10s and log as percentage
-rw-r--r-- | synapse/storage/_base.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 0849c5f1b4..f1df5d39fd 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -103,9 +103,9 @@ class SQLBaseStore(object): ratio = (curr - prev)/(time_now - time_then) - logger.info("Total database time: %.3f", ratio) + logger.info("Total database time: %.3f%", ratio * 100) - self._clock.looping_call(loop, 1000) + self._clock.looping_call(loop, 10000) @defer.inlineCallbacks def runInteraction(self, desc, func, *args, **kwargs): |