diff options
author | Olivier Wilkinson (reivilibre) <oliverw@matrix.org> | 2022-11-11 12:32:04 +0000 |
---|---|---|
committer | Olivier Wilkinson (reivilibre) <oliverw@matrix.org> | 2022-11-11 12:32:04 +0000 |
commit | f9c9efe88d2e509a838fa124a706e8d52003a86d (patch) | |
tree | 869e13808188562efb828723bc655db6cd85919a | |
parent | Remove duplicated code to evict entries. (#14410) (diff) | |
download | synapse-f9c9efe88d2e509a838fa124a706e8d52003a86d.tar.xz |
Measure listening time
-rw-r--r-- | synapse/app/generic_worker.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py index cb5892f041..73ec81a9c6 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py @@ -14,6 +14,7 @@ # limitations under the License. import logging import sys +import time from typing import Dict, List, Optional, Tuple from twisted.internet import address @@ -393,6 +394,7 @@ class GenericWorkerServer(HomeServer): logger.info("Synapse worker now listening on port %d", port) def start_listening(self) -> None: + start = time.time() for listener in self.config.worker.worker_listeners: if listener.type == "http": self._listen_http(listener) @@ -418,6 +420,9 @@ class GenericWorkerServer(HomeServer): else: logger.warning("Unsupported listener type: %s", listener.type) + end = time.time() + logger.error("TIMING start_listening %.6f", end - start) + self.get_replication_command_handler().start_replication(self) |