Measure notify_interested_services

This commit is contained in:
Erik Johnston 2016-08-17 11:12:29 +01:00
parent 949629291c
commit 62c5245c87

View file

@ -17,6 +17,7 @@ from twisted.internet import defer
from synapse.api.constants import EventTypes
from synapse.appservice import ApplicationService
from synapse.util.metrics import Measure
import logging
@ -42,6 +43,7 @@ class ApplicationServicesHandler(object):
self.appservice_api = hs.get_application_service_api()
self.scheduler = hs.get_application_service_scheduler()
self.started_scheduler = False
self.clock = hs.get_clock()
@defer.inlineCallbacks
def notify_interested_services(self, event):
@ -53,6 +55,7 @@ class ApplicationServicesHandler(object):
Args:
event(Event): The event to push out to interested services.
"""
with Measure(self.clock, "notify_interested_services"):
# Gather interested services
services = yield self._get_services_for_event(event)
if len(services) == 0: