mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-17 09:04:07 +01:00
fix up tests
This commit is contained in:
parent
3ef5cd74a6
commit
57ad76fa4a
1 changed files with 3 additions and 3 deletions
|
@ -62,7 +62,7 @@ class Measure(object):
|
||||||
__slots__ = [
|
__slots__ = [
|
||||||
"clock", "name", "start_context", "start", "new_context", "ru_utime",
|
"clock", "name", "start_context", "start", "new_context", "ru_utime",
|
||||||
"ru_stime",
|
"ru_stime",
|
||||||
"db_txn_count", "db_txn_duration_ms", "db_sched_duration_ms",
|
"db_txn_count", "db_txn_duration_sec", "db_sched_duration_sec",
|
||||||
"created_context",
|
"created_context",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -83,8 +83,8 @@ class Measure(object):
|
||||||
|
|
||||||
self.ru_utime, self.ru_stime = self.start_context.get_resource_usage()
|
self.ru_utime, self.ru_stime = self.start_context.get_resource_usage()
|
||||||
self.db_txn_count = self.start_context.db_txn_count
|
self.db_txn_count = self.start_context.db_txn_count
|
||||||
self.db_txn_duration_ms = self.start_context.db_txn_duration_ms
|
self.db_txn_duration_sec = self.start_context.db_txn_duration_sec
|
||||||
self.db_sched_duration_ms = self.start_context.db_sched_duration_ms
|
self.db_sched_duration_sec = self.start_context.db_sched_duration_sec
|
||||||
|
|
||||||
def __exit__(self, exc_type, exc_val, exc_tb):
|
def __exit__(self, exc_type, exc_val, exc_tb):
|
||||||
if isinstance(exc_type, Exception) or not self.start_context:
|
if isinstance(exc_type, Exception) or not self.start_context:
|
||||||
|
|
Loading…
Reference in a new issue