summary refs log tree commit diff
path: root/synapse/handlers/device.py
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-02-02 18:55:57 +0000
committerGitHub <noreply@github.com>2017-02-02 18:55:57 +0000
commita5d9303283b4bd4dfe4b994e40133def43fd556f (patch)
treef6a3af152407b94fbce89397e0a246548945d972 /synapse/handlers/device.py
parentMerge pull request #1877 from matrix-org/erikj/device_list_fixes (diff)
parentMeasure new device list stuff (diff)
downloadsynapse-a5d9303283b4bd4dfe4b994e40133def43fd556f.tar.xz
Merge pull request #1878 from matrix-org/erikj/device_measure
Measure new device list stuff
Diffstat (limited to 'synapse/handlers/device.py')
-rw-r--r--synapse/handlers/device.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/handlers/device.py b/synapse/handlers/device.py
index 158206aef6..8cb47ac417 100644
--- a/synapse/handlers/device.py
+++ b/synapse/handlers/device.py
@@ -17,6 +17,7 @@ from synapse.api import errors
 from synapse.api.constants import EventTypes
 from synapse.util import stringutils
 from synapse.util.async import Linearizer
+from synapse.util.metrics import measure_func
 from synapse.types import get_domain_from_id, RoomStreamToken
 from twisted.internet import defer
 from ._base import BaseHandler
@@ -193,6 +194,7 @@ class DeviceHandler(BaseHandler):
             else:
                 raise
 
+    @measure_func("notify_device_update")
     @defer.inlineCallbacks
     def notify_device_update(self, user_id, device_ids):
         """Notify that a user's device(s) has changed. Pokes the notifier, and
@@ -223,6 +225,7 @@ class DeviceHandler(BaseHandler):
             for host in hosts:
                 self.federation_sender.send_device_messages(host)
 
+    @measure_func("device.get_user_ids_changed")
     @defer.inlineCallbacks
     def get_user_ids_changed(self, user_id, from_token):
         """Get list of users that have had the devices updated, or have newly
@@ -276,6 +279,7 @@ class DeviceHandler(BaseHandler):
         # and those that actually still share a room with the user
         defer.returnValue(users_who_share_room & possibly_changed)
 
+    @measure_func("_incoming_device_list_update")
     @defer.inlineCallbacks
     def _incoming_device_list_update(self, origin, edu_content):
         user_id = edu_content["user_id"]