summary refs log tree commit diff
path: root/synapse/util/metrics.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2016-08-22 12:13:07 +0100
committerGitHub <noreply@github.com>2016-08-22 12:13:07 +0100
commite65bc7d3153db2c2670a5bd255dd76a6906679d4 (patch)
treef96f7e285fbb4d678fab6e95e7ec936859027cd6 /synapse/util/metrics.py
parentMerge pull request #1032 from matrix-org/matthew/workerdoc (diff)
parentAdd exception logging. Fix typo (diff)
downloadsynapse-e65bc7d3153db2c2670a5bd255dd76a6906679d4.tar.xz
Merge pull request #1031 from matrix-org/erikj/measure_notifier
Add more Measure blocks
Diffstat (limited to 'synapse/util/metrics.py')
-rw-r--r--synapse/util/metrics.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/util/metrics.py b/synapse/util/metrics.py
index 76f301f549..4ea930d3e8 100644
--- a/synapse/util/metrics.py
+++ b/synapse/util/metrics.py
@@ -87,7 +87,7 @@ class Measure(object):
         self.db_txn_duration = self.start_context.db_txn_duration
 
     def __exit__(self, exc_type, exc_val, exc_tb):
-        if exc_type is not None or not self.start_context:
+        if isinstance(exc_type, Exception) or not self.start_context:
             return
 
         duration = self.clock.time_msec() - self.start