summary refs log tree commit diff
path: root/synapse/http
diff options
context:
space:
mode:
authorRichard van der Hoff <1389908+richvdh@users.noreply.github.com>2018-06-22 11:17:56 +0100
committerGitHub <noreply@github.com>2018-06-22 11:17:56 +0100
commit70e650191347eaf3d560ffb116b92f258e9ee52a (patch)
treeb3b24c7fc1cf58d110c6bb05adde80f02753f3b4 /synapse/http
parentMerge pull request #3418 from matrix-org/rav/fix_metric_desc (diff)
parentIndirect evt_count updates via method call (diff)
downloadsynapse-70e650191347eaf3d560ffb116b92f258e9ee52a.tar.xz
Merge pull request #3419 from matrix-org/rav/events_per_request
Log number of events fetched from DB
Diffstat (limited to 'synapse/http')
-rw-r--r--synapse/http/site.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/http/site.py b/synapse/http/site.py
index 2664006f8c..74a752d6cf 100644
--- a/synapse/http/site.py
+++ b/synapse/http/site.py
@@ -99,16 +99,18 @@ class SynapseRequest(Request):
             db_txn_count = context.db_txn_count
             db_txn_duration_sec = context.db_txn_duration_sec
             db_sched_duration_sec = context.db_sched_duration_sec
+            evt_db_fetch_count = context.evt_db_fetch_count
         except Exception:
             ru_utime, ru_stime = (0, 0)
             db_txn_count, db_txn_duration_sec = (0, 0)
+            evt_db_fetch_count = 0
 
         end_time = time.time()
 
         self.site.access_logger.info(
             "%s - %s - {%s}"
             " Processed request: %.3fsec (%.3fsec, %.3fsec) (%.3fsec/%.3fsec/%d)"
-            " %sB %s \"%s %s %s\" \"%s\"",
+            " %sB %s \"%s %s %s\" \"%s\" [%d dbevts]",
             self.getClientIP(),
             self.site.site_tag,
             self.authenticated_entity,
@@ -124,6 +126,7 @@ class SynapseRequest(Request):
             self.get_redacted_uri(),
             self.clientproto,
             self.get_user_agent(),
+            evt_db_fetch_count,
         )
 
         try: