Bugfix to sql_txn_timer increment - add only the per-TXN duration, not the total time ever spent since boot
This commit is contained in:
parent
c782e893ec
commit
e75fa8bbbf
|
@ -260,15 +260,13 @@ class SQLBaseStore(object):
|
||||||
raise
|
raise
|
||||||
finally:
|
finally:
|
||||||
end = time.time() * 1000
|
end = time.time() * 1000
|
||||||
transaction_logger.debug(
|
duration = end - start
|
||||||
"[TXN END] {%s} %f",
|
|
||||||
name, end - start
|
|
||||||
)
|
|
||||||
|
|
||||||
self._current_txn_total_time += end - start
|
transaction_logger.debug("[TXN END] {%s} %f", name, duration)
|
||||||
|
|
||||||
|
self._current_txn_total_time += duration
|
||||||
self._txn_perf_counters.update(desc, start, end)
|
self._txn_perf_counters.update(desc, start, end)
|
||||||
|
sql_txn_timer.inc_by(duration, desc)
|
||||||
sql_txn_timer.inc_by(self._current_txn_total_time, desc)
|
|
||||||
|
|
||||||
with PreserveLoggingContext():
|
with PreserveLoggingContext():
|
||||||
result = yield self._db_pool.runInteraction(
|
result = yield self._db_pool.runInteraction(
|
||||||
|
|
Loading…
Reference in New Issue