Commits

Mike Bayer committed fff7147

more adjustments

Comments (0)

Files changed (4)

test/aaa_profiling/test_pool.py

     # 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()
 
         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

test/aaa_profiling/test_zoomark.py

     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()
 
     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()
 

test/aaa_profiling/test_zoomark_orm.py

     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()
 

test/lib/profiling.py

     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]
             "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):