]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
more adjustments
authorMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Aug 2012 20:43:46 +0000 (16:43 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Thu, 9 Aug 2012 20:43:46 +0000 (16:43 -0400)
test/aaa_profiling/test_pool.py
test/aaa_profiling/test_zoomark.py
test/aaa_profiling/test_zoomark_orm.py
test/lib/profiling.py

index da4196549ce86e21407281aa5473c3f42f2c812a..b55156bf5855fa0daadd904732c7d3dd3a60fc8c 100644 (file)
@@ -32,7 +32,7 @@ class QueuePoolTest(fixtures.TestBase, AssertsExecutionResults):
     # probably
     # due to the event mechanics being established
     # or not already...
-    @profiling.function_call_count(72, variance=.15)
+    @profiling.function_call_count(55, variance=.15)
     def test_first_connect(self):
         conn = pool.connect()
 
@@ -40,7 +40,7 @@ class QueuePoolTest(fixtures.TestBase, AssertsExecutionResults):
         conn = pool.connect()
         conn.close()
 
-        @profiling.function_call_count(29, variance=.10)
+        @profiling.function_call_count(17, variance=.10)
         def go():
             conn2 = pool.connect()
             return conn2
index be158613edc65f8704880fa3496e23a9cb23b420..0ecd908e71fcf640a4a9bc5207d806a31abc5a18 100644 (file)
@@ -369,15 +369,15 @@ class ZooMarkTest(fixtures.TestBase):
     def test_profile_1_create_tables(self):
         self.test_baseline_1_create_tables()
 
-    @profiling.function_call_count(4798)
+    @profiling.function_call_count(4377)
     def test_profile_1a_populate(self):
         self.test_baseline_1a_populate()
 
-    @profiling.function_call_count(245)
+    @profiling.function_call_count(218)
     def test_profile_2_insert(self):
         self.test_baseline_2_insert()
 
-    @profiling.function_call_count(3118)
+    @profiling.function_call_count(2837)
     def test_profile_3_properties(self):
         self.test_baseline_3_properties()
 
@@ -389,7 +389,7 @@ class ZooMarkTest(fixtures.TestBase):
     def test_profile_5_aggregates(self):
         self.test_baseline_5_aggregates()
 
-    @profiling.function_call_count(1606)
+    @profiling.function_call_count(1475)
     def test_profile_6_editing(self):
         self.test_baseline_6_editing()
 
index f5911856e3e3a3fcfd00b12b7212a5e4864a6b52..942c431a1126a0c9af7a2552b94faf303c8275fd 100644 (file)
@@ -351,8 +351,7 @@ class ZooMarkTest(fixtures.TestBase):
     def test_profile_4_expressions(self):
         self.test_baseline_4_expressions()
 
-    @profiling.function_call_count(1065,
-                                   variance=0.1)
+    @profiling.function_call_count(900)
     def test_profile_5_aggregates(self):
         self.test_baseline_5_aggregates()
 
index 0c0fe70062796fb24e3b18e0219180f41d80fcca..ca93543489157d97bfd6141419c9885856f88cc2 100644 (file)
@@ -128,11 +128,12 @@ def _paths(key, stats, cache, seen=None):
     else:
         seen[key] += 1
         try:
+            path_element = (fname, lineno, fn_name)
             paths_to_yield = []
             (cc, nc, tt, ct, callers) = stats[key]
             if not callers:
-                paths_to_yield.append(())
-                yield ()
+                paths_to_yield.append((path_element,))
+                yield (path_element,)
 
             for subkey in callers:
                 sub_cc, sub_nc, sub_tt, sub_ct = callers[subkey]
@@ -152,12 +153,27 @@ def _exclude(path):
             "processors" in pfname or \
             "cutils" in pfname:
             return True
+        if "threading.py" in pfname:
+            return True
+
+    if (
+            "result.py" in pfname or
+            "engine/base.py" in pfname
+        ) and pfuncname in ("__iter__", "__getitem__"):
+        return True
+
+    if "utf_8.py" in pfname and pfuncname == "decode":
+        return True
+
     if path[-1][2] in (
             "<built-in method exec>",
             "<listcomp>"
             ):
         return True
 
+    if '_thread.RLock' in path[-1][2]:
+        return True
+
     return False
 
 def _count_calls(options, fn, *args, **kw):