diff options
author | Mark Haines <mark.haines@matrix.org> | 2015-02-09 18:06:31 +0000 |
---|---|---|
committer | Mark Haines <mark.haines@matrix.org> | 2015-02-09 18:06:31 +0000 |
commit | 0c4536da8fe75a207052fb558414b4408aa857ec (patch) | |
tree | e964da8d95d12ef9f4692dfef645169d236cc82d | |
parent | Formatting (diff) | |
download | synapse-0c4536da8fe75a207052fb558414b4408aa857ec.tar.xz |
Use the transaction 'desc' rather than 'name', increment the txn_ids in
txn names
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/_base.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py index 45f4b994eb..5ddd410607 100644 --- a/synapse/storage/_base.py +++ b/synapse/storage/_base.py @@ -140,7 +140,7 @@ class SQLBaseStore(object): with LoggingContext("runInteraction") as context: current_context.copy_to(context) start = time.time() * 1000 - txn_id = SQLBaseStore._TXN_ID + txn_id = self._TXN_ID # We don't really need these to be unique, so lets stop it from # growing really large. @@ -163,10 +163,10 @@ class SQLBaseStore(object): self._current_txn_total_time += end - start - count, cum_time = self._txn_perf_counters.get(name, (0,0)) + count, cum_time = self._txn_perf_counters.get(desc, (0,0)) count += 1 cum_time += end - start - self._txn_perf_counters[name] = (count, cum_time) + self._txn_perf_counters[desc] = (count, cum_time) with PreserveLoggingContext(): result = yield self._db_pool.runInteraction( |