summary refs log tree commit diff
path: root/synapse/util
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-03-13 11:38:57 +0000
committerErik Johnston <erik@matrix.org>2015-03-13 11:38:57 +0000
commit75bf48b905bd48b82cac822fb3ae67a64f6ee2db (patch)
tree2f1f0f18bde9df50129293b74f55e0c63814fe85 /synapse/util
parentAdd a utility class that can be used to generate a twisted deferred aware cal... (diff)
downloadsynapse-github/function_tracer.tar.xz
Update tracer to give more information github/function_tracer function_tracer
Diffstat (limited to 'synapse/util')
-rw-r--r--synapse/util/traceutil.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/util/traceutil.py b/synapse/util/traceutil.py
index e313912801..1aca33298e 100644
--- a/synapse/util/traceutil.py
+++ b/synapse/util/traceutil.py
@@ -29,6 +29,7 @@ class Tracer(object):
 
         self.next_id = 1
 
+        self.deferred_frames = {}
         self.deferred_to_current_frames = {}
 
     def process(self, frame, event, arg):
@@ -44,11 +45,16 @@ class Tracer(object):
             trace_id = self.get_next_id()
             deferred.syn_trace_defer_id = trace_id
             logger.info(
-                "%s named Deferred %s",
+                "%s named %s",
                 trace_id,
                 self.get_name_for_frame(generator.gi_frame)
             )
 
+            logger.info(
+                "%s is deferred",
+                trace_id,
+            )
+
             logger.info("%s start %d", trace_id, int(time.time() * 1000))
 
             def do(res):