Use the transaction 'desc' rather than 'name', increment the txn_ids in

txn names
pull/57/head
Mark Haines 2015-02-09 18:06:31 +00:00
parent 347b497db0
commit 0c4536da8f
1 changed files with 3 additions and 3 deletions

View File

@ -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(