mirror of
https://github.com/element-hq/synapse
synced 2024-08-20 12:00:21 +00:00
Only abort Measure on Exceptions
This commit is contained in:
parent
afbf6b33fc
commit
8731197e54
1 changed files with 1 additions and 1 deletions
|
@ -87,7 +87,7 @@ class Measure(object):
|
||||||
self.db_txn_duration = self.start_context.db_txn_duration
|
self.db_txn_duration = self.start_context.db_txn_duration
|
||||||
|
|
||||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
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
|
return
|
||||||
|
|
||||||
duration = self.clock.time_msec() - self.start
|
duration = self.clock.time_msec() - self.start
|
||||||
|
|
Loading…
Reference in a new issue