summaryrefslogtreecommitdiff
path: root/test/aaa_profiling/test_resultset.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2010-12-05 12:09:06 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2010-12-05 12:09:06 -0500
commit49145a6940062486a6eec66bfe5c9d95c5f76c7a (patch)
tree7a0d193f2eb0cf8f7626ba5652aefa2ca5f58c33 /test/aaa_profiling/test_resultset.py
parent8e6b5ab1bd541d5f6267ebdbcca1389e00b00d02 (diff)
downloadsqlalchemy-49145a6940062486a6eec66bfe5c9d95c5f76c7a.tar.gz
- more inlining. nominal execution on sqlite down to 36 calls, from 51 in 0.6.
Diffstat (limited to 'test/aaa_profiling/test_resultset.py')
-rw-r--r--test/aaa_profiling/test_resultset.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/aaa_profiling/test_resultset.py b/test/aaa_profiling/test_resultset.py
index 9904267dc..74c0927c6 100644
--- a/test/aaa_profiling/test_resultset.py
+++ b/test/aaa_profiling/test_resultset.py
@@ -40,3 +40,30 @@ class ResultSetTest(TestBase, AssertsExecutionResults):
'2.6+cextension': 409, '2.7+cextension':409})
def test_unicode(self):
[tuple(row) for row in t2.select().execute().fetchall()]
+
+class ExecutionTest(TestBase):
+ __only_on__ = 'sqlite'
+
+ def test_minimal_connection_execute(self):
+ # create an engine without any instrumentation.
+ e = create_engine('sqlite://')
+ c = e.connect()
+ # ensure initial connect activities complete
+ c.execute("select 1")
+
+ @profiling.function_call_count(36, variance=.01)
+ def go():
+ c.execute("select 1")
+ go()
+
+ def test_minimal_engine_execute(self):
+ # create an engine without any instrumentation.
+ e = create_engine('sqlite://')
+ # ensure initial connect activities complete
+ e.execute("select 1")
+
+ @profiling.function_call_count(59, variance=.01)
+ def go():
+ e.execute("select 1")
+ go()
+