diff options
author | Erik Johnston <erik@matrix.org> | 2015-06-01 14:08:10 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-06-01 14:08:10 +0100 |
commit | 1b0c857a6e9bdd41eba85df8ceacc7efcfed3f0c (patch) | |
tree | d158ed39ddb0a61a750995e48ffc3476cf623a0d | |
parent | Make class variable (diff) | |
download | synapse-1b0c857a6e9bdd41eba85df8ceacc7efcfed3f0c.tar.xz |
Hook into more things
-rwxr-xr-x | synapse/app/homeserver.py | 6 |
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: |