summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/testing/profiling.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2014-11-14 11:06:43 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2014-11-14 11:06:43 -0500
commitde9103aae22ba548323a3e469624f02d1d279103 (patch)
treee182695bbf8e04a7a6d6e85df62e12b7e82fd4f0 /lib/sqlalchemy/testing/profiling.py
parent026449c15ff35a9b89c2ca591d3e3cc791857272 (diff)
downloadsqlalchemy-de9103aae22ba548323a3e469624f02d1d279103.tar.gz
- correct this to rewrite a multiple profile line correctly
Diffstat (limited to 'lib/sqlalchemy/testing/profiling.py')
-rw-r--r--lib/sqlalchemy/testing/profiling.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/sqlalchemy/testing/profiling.py b/lib/sqlalchemy/testing/profiling.py
index fcb888f86..6fc51ef32 100644
--- a/lib/sqlalchemy/testing/profiling.py
+++ b/lib/sqlalchemy/testing/profiling.py
@@ -115,7 +115,11 @@ class ProfileStatsFile(object):
per_fn = self.data[test_key]
per_platform = per_fn[self.platform_key]
counts = per_platform['counts']
- counts[-1] = callcount
+ current_count = per_platform['current_count']
+ if current_count < len(counts):
+ counts[current_count - 1] = callcount
+ else:
+ counts[-1] = callcount
if self.write:
self._write()