diff options
author | Erik Johnston <erik@matrix.org> | 2017-09-11 16:28:20 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2017-09-11 16:28:20 +0100 |
commit | a991cf036e63f99c0c5aed2f2c8446648b7b5db1 (patch) | |
tree | 056d1d0265e98f381569923e3902afb5a4ede1ef | |
parent | Merge pull request #2439 from matrix-org/rav/tox_tweaks (diff) | |
download | synapse-a991cf036e63f99c0c5aed2f2c8446648b7b5db1.tar.xz |
Add logging for many pdu/edus github/erikj/many_edu_logging erikj/many_edu_logging
-rw-r--r-- | synapse/federation/transaction_queue.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/synapse/federation/transaction_queue.py b/synapse/federation/transaction_queue.py index 003eaba893..91ffb7e05d 100644 --- a/synapse/federation/transaction_queue.py +++ b/synapse/federation/transaction_queue.py @@ -435,6 +435,12 @@ class TransactionQueue(object): # END CRITICAL SECTION + if len(pending_pdus) > 10: + logger.info("Sending %d pdus to %r", len(pending_pdus), destination) + + if len(pending_edus) > 10: + logger.info("Sending %d edus to %r", len(pending_edus), destination) + success = yield self._send_new_transaction( destination, pending_pdus, pending_edus, pending_failures, ) @@ -494,6 +500,12 @@ class TransactionQueue(object): for content in contents ] + if len(contents) > 10: + logger.info( + "Sending %d direct to device messages to %r", + len(contents), destination, + ) + last_device_list = self.last_device_list_stream_id_by_dest.get(destination, 0) now_stream_id, results = yield self.store.get_devices_by_remote( destination, last_device_list @@ -507,6 +519,10 @@ class TransactionQueue(object): ) for content in results ) + + if len(results) > 10: + logger.info("Sending %d device list updates to %r", len(results), destination) + defer.returnValue((edus, stream_id, now_stream_id)) @measure_func("_send_new_transaction") |