summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-06-01 14:08:10 +0100
committerErik Johnston <erik@matrix.org>2015-06-01 14:08:10 +0100
commit1b0c857a6e9bdd41eba85df8ceacc7efcfed3f0c (patch)
treed158ed39ddb0a61a750995e48ffc3476cf623a0d
parentMake class variable (diff)
downloadsynapse-1b0c857a6e9bdd41eba85df8ceacc7efcfed3f0c.tar.xz
Hook into more things
-rwxr-xr-xsynapse/app/homeserver.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py
index a8e1a94dcb..799c08ac9f 100755
--- a/synapse/app/homeserver.py
+++ b/synapse/app/homeserver.py
@@ -525,20 +525,22 @@ def run(hs):
         from synapse.handlers.room import RoomMemberHandler
         import time
         def g(*args, **kwargs):
+            RoomMemberHandler.total_time = 0
             start = int(time.time()*1000)
             f(*args, **kwargs)
             end = int(time.time()*1000)
 
             if RoomMemberHandler.total_time > 0:
                 logger.info(
-                    "Total time in get_room_members: %d ms / %d ms",
+                    "Total time in get_room_members: %s %d ms / %d ms",
+                    f.__name__,
                     int(RoomMemberHandler.total_time*1000),
                     end - start
                 )
-            RoomMemberHandler.total_time = 0
         return g
 
     reactor.runUntilCurrent = prof(reactor.runUntilCurrent)
+    reactor.doIteration = prof(reactor.doIteration)
 
     PROFILE_SYNAPSE = False
     if PROFILE_SYNAPSE: