summary refs log tree commit diff
diff options
context:
space:
mode:
authorOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-28 14:28:44 +0100
committerOlivier Wilkinson (reivilibre) <olivier@librepush.net>2019-08-28 14:28:44 +0100
commitbc2c284dbe02ef283ab525f14febd7d0998ba552 (patch)
treea77d917f8c8d08e7e7588117aa3f20f353f61e6c
parentMerge pull request #5890 from matrix-org/rei/rss_inc3 (diff)
downloadsynapse-bc2c284dbe02ef283ab525f14febd7d0998ba552.tar.xz
Add `total_event_bytes` to room statistics schema.
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
-rw-r--r--synapse/storage/schema/delta/56/stats_separated1.sql2
-rw-r--r--synapse/storage/stats.py1
2 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/schema/delta/56/stats_separated1.sql b/synapse/storage/schema/delta/56/stats_separated1.sql
index 52fb09c0e6..6d4648c0d7 100644
--- a/synapse/storage/schema/delta/56/stats_separated1.sql
+++ b/synapse/storage/schema/delta/56/stats_separated1.sql
@@ -69,6 +69,7 @@ CREATE TABLE IF NOT EXISTS room_stats_current (
 
     current_state_events INT NOT NULL,
     total_events INT NOT NULL,
+    total_event_bytes BIGINT NOT NULL,
     joined_members INT NOT NULL,
     invited_members INT NOT NULL,
     left_members INT NOT NULL,
@@ -91,6 +92,7 @@ CREATE TABLE IF NOT EXISTS room_stats_historical (
 
     current_state_events INT NOT NULL,
     total_events INT NOT NULL,
+    total_event_bytes BIGINT NOT NULL,
     joined_members INT NOT NULL,
     invited_members INT NOT NULL,
     left_members INT NOT NULL,
diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py
index 3df57b52ea..8c99a125a9 100644
--- a/synapse/storage/stats.py
+++ b/synapse/storage/stats.py
@@ -36,6 +36,7 @@ ABSOLUTE_STATS_FIELDS = {
         "left_members",
         "banned_members",
         "total_events",
+        "total_event_bytes",
     ),
     "user": ("public_rooms", "private_rooms"),
 }