summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2019-06-19 11:49:39 +0100
committerErik Johnston <erik@matrix.org>2019-06-19 11:49:39 +0100
commit65787b0f7c8b1c1725da63ceeca4d3e25607af1f (patch)
treed078f290c078bced29e560322c564599ed8bbc6b /synapse/storage
parentOnly count non-cache state resolution (diff)
downloadsynapse-65787b0f7c8b1c1725da63ceeca4d3e25607af1f.tar.xz
Add descriptions and remove redundant set(..)
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/events.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index f2374bc3f4..9903786c48 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -76,14 +76,16 @@ state_delta_reuse_delta_counter = Counter(
 
 # The number of forward extremities for each new event.
 forward_extremities_counter = Histogram(
-    "synapse_storage_events_forward_extremities_persisted", "",
+    "synapse_storage_events_forward_extremities_persisted",
+    "Number of forward extremities for each new event",
     buckets=(1, 2, 3, 5, 7, 10, 15, 20, 50, 100, 200, 500, "+Inf")
 )
 
 # The number of stale forward extremities for each new event. Stale extremities
 # are those that were in the previous set of extremities as well as the new.
 stale_forward_extremities_counter = Histogram(
-    "synapse_storage_events_stale_forward_extremities_persisted", "",
+    "synapse_storage_events_stale_forward_extremities_persisted",
+    "Number of unchanged forward extremities for each new event",
     buckets=(0, 1, 2, 3, 5, 7, 10, 15, 20, 50, 100, 200, 500, "+Inf")
 )
 
@@ -583,7 +585,7 @@ class EventsStore(
         # (e.g. we ignore backfill/outliers/etc)
         if result != latest_event_ids:
             forward_extremities_counter.observe(len(result))
-            stale = set(latest_event_ids) & result
+            stale = latest_event_ids & result
             stale_forward_extremities_counter.observe(len(stale))
 
         defer.returnValue(result)