From: Mike Bayer Date: Sat, 13 Mar 2010 00:57:06 +0000 (-0500) Subject: move the initial connect out of the profile zone so we don't get a method call hit... X-Git-Tag: rel_0_6beta2~54^2~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1f27092a453ce9f9a48a007e4b046c48f5aa21aa;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git move the initial connect out of the profile zone so we don't get a method call hit on that --- diff --git a/test/aaa_profiling/test_zoomark.py b/test/aaa_profiling/test_zoomark.py index 34eb77632b..68155527a6 100644 --- a/test/aaa_profiling/test_zoomark.py +++ b/test/aaa_profiling/test_zoomark.py @@ -39,7 +39,8 @@ class ZooMarkTest(TestBase): engine = engines.testing_engine(options={'creator':recorder}) engine.dialect._unwrap_connection = engines.unwrap_connection metadata = MetaData(engine) - + engine.connect() + def test_baseline_1_create_tables(self): Zoo = Table('Zoo', metadata, Column('ID', Integer, Sequence('zoo_id_seq'), @@ -322,7 +323,8 @@ class ZooMarkTest(TestBase): engine = create_engine('postgresql:///', creator=player) engine.dialect._unwrap_connection = engines.unwrap_connection metadata = MetaData(engine) - + engine.connect() + @profiling.function_call_count(3178, {'2.4': 2012}) def test_profile_1_create_tables(self): self.test_baseline_1_create_tables() diff --git a/test/aaa_profiling/test_zoomark_orm.py b/test/aaa_profiling/test_zoomark_orm.py index 7029944a25..62a27eca44 100644 --- a/test/aaa_profiling/test_zoomark_orm.py +++ b/test/aaa_profiling/test_zoomark_orm.py @@ -39,7 +39,8 @@ class ZooMarkTest(TestBase): engine.dialect._unwrap_connection = engines.unwrap_connection metadata = MetaData(engine) session = sessionmaker()() - + engine.connect() + def test_baseline_1_create_tables(self): zoo = Table('Zoo', metadata, Column('ID', Integer, Sequence('zoo_id_seq'), @@ -286,7 +287,8 @@ class ZooMarkTest(TestBase): engine.dialect._unwrap_connection = engines.unwrap_connection metadata = MetaData(engine) session = sessionmaker()() - + engine.connect() + @profiling.function_call_count(4898) def test_profile_1_create_tables(self): self.test_baseline_1_create_tables()