summaryrefslogtreecommitdiff
path: root/test/profiling/pool.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2008-08-13 22:41:17 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2008-08-13 22:41:17 +0000
commitcd7678a965594ff2db153a7cade0fe8555bd0d38 (patch)
tree51d029be7b976c0c9da0cb0f265435b5d1caa0e9 /test/profiling/pool.py
parentc374f7b8b52b4169d41cf8d2cfe310ed5fd5f925 (diff)
downloadsqlalchemy-cd7678a965594ff2db153a7cade0fe8555bd0d38.tar.gz
- with 2.3 support dropped,
all usage of thread.get_ident() is removed, and replaced with threading.local() usage. this allows potentially faster and safer thread local access.
Diffstat (limited to 'test/profiling/pool.py')
-rw-r--r--test/profiling/pool.py14
1 files changed, 4 insertions, 10 deletions
diff --git a/test/profiling/pool.py b/test/profiling/pool.py
index 4b146fbab..72c4b03e4 100644
--- a/test/profiling/pool.py
+++ b/test/profiling/pool.py
@@ -15,14 +15,8 @@ class QueuePoolTest(TestBase, AssertsExecutionResults):
pool_size=3, max_overflow=-1,
use_threadlocal=True)
- # the WeakValueDictionary used for the pool's "threadlocal" idea adds 1-6
- # method calls to each of these. however its just a lot easier stability
- # wise than dealing with a strongly referencing dict of weakrefs.
- # [ticket:754] immediately got opened when we tried a dict of weakrefs,
- # and though the solution there is simple, it still doesn't solve the
- # issue of "dead" weakrefs sitting in the dict taking up space
-
- @profiling.function_call_count(63, {'2.3': 42, '2.4': 43})
+
+ @profiling.function_call_count(54, {'2.3': 42, '2.4': 43})
def test_first_connect(self):
conn = pool.connect()
@@ -30,7 +24,7 @@ class QueuePoolTest(TestBase, AssertsExecutionResults):
conn = pool.connect()
conn.close()
- @profiling.function_call_count(39, {'2.3': 26, '2.4': 26})
+ @profiling.function_call_count(31, {'2.3': 26, '2.4': 26})
def go():
conn2 = pool.connect()
return conn2
@@ -39,7 +33,7 @@ class QueuePoolTest(TestBase, AssertsExecutionResults):
def test_second_samethread_connect(self):
conn = pool.connect()
- @profiling.function_call_count(7, {'2.3': 4, '2.4': 4})
+ @profiling.function_call_count(5, {'2.3': 4, '2.4': 4})
def go():
return pool.connect()
c2 = go()