]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
move the initial connect out of the profile zone so we don't get a method call hit...
authorMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 Mar 2010 00:57:06 +0000 (19:57 -0500)
committerMike Bayer <mike_mp@zzzcomputing.com>
Sat, 13 Mar 2010 00:57:06 +0000 (19:57 -0500)
test/aaa_profiling/test_zoomark.py
test/aaa_profiling/test_zoomark_orm.py

index 34eb77632bef31b54c7eaf5ad01566310f81f1e5..68155527a619299e575b8ae467f090dc2efa6434 100644 (file)
@@ -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()
index 7029944a252cf138de04d6d6de8b9ce0105f1e28..62a27eca441fb5ab7662eefa02274be4e800ff57 100644 (file)
@@ -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()