diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-28 19:51:53 +1000 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-28 19:51:53 +1000 |
commit | 57ad76fa4a4fb76dc1b9c7e8232b9589b9731ff6 (patch) | |
tree | 8c302a1c18de1d46c95eeb2184d51be6482731fe /synapse/util/metrics.py | |
parent | update to more consistently use seconds in any metrics or logging (diff) | |
download | synapse-57ad76fa4a4fb76dc1b9c7e8232b9589b9731ff6.tar.xz |
fix up tests
Diffstat (limited to 'synapse/util/metrics.py')
-rw-r--r-- | synapse/util/metrics.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/util/metrics.py b/synapse/util/metrics.py index 23fc0ca20d..1ba7d65c7c 100644 --- a/synapse/util/metrics.py +++ b/synapse/util/metrics.py @@ -62,7 +62,7 @@ class Measure(object): __slots__ = [ "clock", "name", "start_context", "start", "new_context", "ru_utime", "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", ] @@ -83,8 +83,8 @@ class Measure(object): 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_duration_ms = self.start_context.db_txn_duration_ms - self.db_sched_duration_ms = self.start_context.db_sched_duration_ms + self.db_txn_duration_sec = self.start_context.db_txn_duration_sec + self.db_sched_duration_sec = self.start_context.db_sched_duration_sec def __exit__(self, exc_type, exc_val, exc_tb): if isinstance(exc_type, Exception) or not self.start_context: |