summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2018-03-27 13:13:38 +0100
committerErik Johnston <erik@matrix.org>2018-03-27 13:13:38 +0100
commite70287cff3adeeeff2a7a1e95fc5845feb365710 (patch)
tree7de98c0a662c4ad865dd816ef2de6103b4ea8c66 /synapse/storage/events.py
parentAdd counter metrics for calculating state delta (diff)
downloadsynapse-e70287cff3adeeeff2a7a1e95fc5845feb365710.tar.xz
Comment
Diffstat (limited to '')
-rw-r--r--synapse/storage/events.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index f3a362db20..ee8b3c46d3 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -52,12 +52,19 @@ persist_event_counter = metrics.register_counter("persisted_events")
 event_counter = metrics.register_counter(
     "persisted_events_sep", labels=["type", "origin_type", "origin_entity"]
 )
+
+# The number of times we are recalculating the current state
 state_delta_counter = metrics.register_counter(
     "state_delta",
 )
+# The number of times we are recalculating state when there is only a
+# single forward extremity
 state_delta_single_event_counter = metrics.register_counter(
     "state_delta_single_event",
 )
+# The number of times we are reculating state when we could have resonably
+# calculated the delta when we calculated the state for an event we were
+# persisting.
 state_delta_reuse_delta_counter = metrics.register_counter(
     "state_delta_reuse_delta",
 )