From 3986fd7626ff29f7debfc72f63ba22235e31ed7e Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Sat, 11 Aug 2012 02:57:25 -0400 Subject: [PATCH] adjustments --- test/aaa_profiling/test_compiler.py | 2 +- test/aaa_profiling/test_orm.py | 2 +- test/aaa_profiling/test_resultset.py | 4 ++-- test/aaa_profiling/test_zoomark.py | 6 +++--- test/aaa_profiling/test_zoomark_orm.py | 2 +- test/lib/profiling.py | 6 ++++++ 6 files changed, 14 insertions(+), 8 deletions(-) diff --git a/test/aaa_profiling/test_compiler.py b/test/aaa_profiling/test_compiler.py index caa782c3a6..129d0bf06c 100644 --- a/test/aaa_profiling/test_compiler.py +++ b/test/aaa_profiling/test_compiler.py @@ -46,7 +46,7 @@ class CompileTest(fixtures.TestBase, AssertsExecutionResults): def test_update_whereclause(self): t1.update().where(t1.c.c2==12).compile(dialect=self.dialect) - @profiling.function_call_count(148) + @profiling.function_call_count(139) def test_select(self): s = select([t1], t1.c.c2==t2.c.c1) s.compile(dialect=self.dialect) diff --git a/test/aaa_profiling/test_orm.py b/test/aaa_profiling/test_orm.py index 83351d6b88..4981530689 100644 --- a/test/aaa_profiling/test_orm.py +++ b/test/aaa_profiling/test_orm.py @@ -85,7 +85,7 @@ class MergeTest(fixtures.MappedTest): # using sqlite3 the C extension took it back up to approx. 1257 # (py2.6) - @profiling.function_call_count(1128, variance=0.10) + @profiling.function_call_count(1016, variance=.10) def go(): p2 = sess2.merge(p1) go() diff --git a/test/aaa_profiling/test_resultset.py b/test/aaa_profiling/test_resultset.py index 29db46ef4f..4cd2133899 100644 --- a/test/aaa_profiling/test_resultset.py +++ b/test/aaa_profiling/test_resultset.py @@ -34,11 +34,11 @@ class ResultSetTest(fixtures.TestBase, AssertsExecutionResults): def teardown(self): metadata.drop_all() - @profiling.function_call_count(336) + @profiling.function_call_count(316) def test_string(self): [tuple(row) for row in t.select().execute().fetchall()] - @profiling.function_call_count(336) + @profiling.function_call_count(316) def test_unicode(self): [tuple(row) for row in t2.select().execute().fetchall()] diff --git a/test/aaa_profiling/test_zoomark.py b/test/aaa_profiling/test_zoomark.py index a254ff15f4..45e83c1b64 100644 --- a/test/aaa_profiling/test_zoomark.py +++ b/test/aaa_profiling/test_zoomark.py @@ -369,7 +369,7 @@ class ZooMarkTest(fixtures.TestBase): def test_profile_1_create_tables(self): self.test_baseline_1_create_tables() - @profiling.function_call_count(4377) + @profiling.function_call_count(4200) def test_profile_1a_populate(self): self.test_baseline_1a_populate() @@ -377,11 +377,11 @@ class ZooMarkTest(fixtures.TestBase): def test_profile_2_insert(self): self.test_baseline_2_insert() - @profiling.function_call_count(2837) + @profiling.function_call_count(2700) def test_profile_3_properties(self): self.test_baseline_3_properties() - @profiling.function_call_count(9700, variance=0.10) + @profiling.function_call_count(8500) def test_profile_4_expressions(self): self.test_baseline_4_expressions() diff --git a/test/aaa_profiling/test_zoomark_orm.py b/test/aaa_profiling/test_zoomark_orm.py index 942c431a11..10dafd6e07 100644 --- a/test/aaa_profiling/test_zoomark_orm.py +++ b/test/aaa_profiling/test_zoomark_orm.py @@ -347,7 +347,7 @@ class ZooMarkTest(fixtures.TestBase): def test_profile_3_properties(self): self.test_baseline_3_properties() - @profiling.function_call_count(17698) + @profiling.function_call_count(16303) def test_profile_4_expressions(self): self.test_baseline_4_expressions() diff --git a/test/lib/profiling.py b/test/lib/profiling.py index 7f73c5829c..a2572b2d20 100644 --- a/test/lib/profiling.py +++ b/test/lib/profiling.py @@ -167,6 +167,8 @@ def _exclude(path): return True if "threading.py" in pfname: return True + if "cprocessors" in pfuncname: + return True if ( "result.py" in pfname or @@ -177,6 +179,10 @@ def _exclude(path): if "utf_8.py" in pfname and pfuncname == "decode": return True + # hasattr seems to be inconsistent + if "hasattr" in path[-1][2]: + return True + if path[-1][2] in ( "", "" -- 2.47.3