From 1f27092a453ce9f9a48a007e4b046c48f5aa21aa Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 12 Mar 2010 19:57:06 -0500 Subject: [PATCH] move the initial connect out of the profile zone so we don't get a method call hit on that --- test/aaa_profiling/test_zoomark.py | 6 ++++-- test/aaa_profiling/test_zoomark_orm.py | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) 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() -- 2.47.3