This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Room Statistics #4338
Merged
Merged
Room Statistics #4338
Changes from 66 commits
Commits
Show all changes
93 commits
Select commit
Hold shift + click to select a range
a34061d
WIP of tracking per-room and per-user stats
ara4n c82785f
flake8
ara4n 6dacdd5
WIP for updating the stats store
ara4n 1875298
hook up state deltas to stats
ara4n 03bdbb8
typo
ara4n a9f535f
Merge remote-tracking branch 'origin/matthew/stats' into hawkowl/room…
hawkowl 087cfa6
fixups
hawkowl cd1caa9
black and cleanups
hawkowl 0fb5123
changelog
hawkowl b5de929
fix
hawkowl abfaba4
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 7d68675
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 8df031d
fix
hawkowl c6dacf6
fixes
hawkowl ae2f002
fixes
hawkowl d85dd46
fixes
hawkowl 896fa6e
fixes
hawkowl c0c3a49
fixes
hawkowl d45f68a
fixes
hawkowl 8cd2457
fixes
hawkowl 40c75b8
fixes
hawkowl 9c1ae80
fixes
hawkowl f2b4b9e
tests
hawkowl 1e6afd6
tests
hawkowl 9918911
tests
hawkowl 1526e24
isort
hawkowl d560f43
tests
hawkowl cab6b0d
tests
hawkowl c4f2b98
Merge branch 'hawkowl/room-stats' of ssh://github.com/matrix-org/syna…
hawkowl 97f2943
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 5c6358d
Merge branch 'hawkowl/room-stats' of github.com:matrix-org/synapse in…
hawkowl 97290a2
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 0ef5b04
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 4d90896
pep8
hawkowl 282de7f
config fix
hawkowl c0932ce
config fix
hawkowl 492d73c
config fix
hawkowl d279cbd
config fix
hawkowl 0963af5
fix stats
hawkowl 27260f2
fix stats
hawkowl c49846c
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 8d9884e
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl a79acf5
fix
hawkowl 5dc9936
fix
hawkowl 11ab570
fix
hawkowl 615f94a
cleanups
hawkowl 9afe329
cleanups
hawkowl 58f3fb4
cleanups
hawkowl 6025fd6
cleanups
hawkowl ace21a2
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl de22de8
make it work based on the state event, not the number of rooms
hawkowl c7e6a46
changelog
hawkowl 2636ffc
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 169085a
turn it on by default
hawkowl 340ffe0
cleanups
hawkowl 3ca5d0b
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl c91388a
black
hawkowl b13dc64
fixes + tests
hawkowl 5c1e2b2
use proper time
hawkowl 263170e
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 2809a4b
review comments
hawkowl f07bcf5
fix tests
hawkowl 22169dc
cleanups
hawkowl 5074aca
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 45dbb51
Update synapse/storage/stats.py
erikjohnston 1cca447
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 9b29621
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl b76289d
review comments
hawkowl c99ce35
some docs
hawkowl e9e887c
test some falling-off-branches
hawkowl 6541652
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl ac685f6
some cleanups and docs
hawkowl 2d631a2
fix
hawkowl bd18134
fix
hawkowl b8365a6
Merge remote-tracking branch 'origin/develop' into hawkowl/test-confi…
hawkowl cafe839
fixes, porting
hawkowl d963a11
fixes, porting
hawkowl ec3d07c
changelog
hawkowl 1ba0ecc
finish porting
hawkowl f531fa4
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 4cfe79b
Merge branch 'hawkowl/test-config-parse' into hawkowl/room-stats
hawkowl 9fac614
fix
hawkowl 0bd23bb
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 1df0d8d
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 35410c4
enable -> enabled
hawkowl adec289
cleanup
hawkowl 0094b65
cleanup
hawkowl f1ab663
cleanup
hawkowl 3c49fa0
Merge remote-tracking branch 'origin/develop' into hawkowl/room-stats
hawkowl 7b1ffe5
fixes
hawkowl 55f49e6
fixes
hawkowl 0f2b24a
fixes
hawkowl d7fa363
fixes
hawkowl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Synapse now more efficiently collates room statistics. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# -*- coding: utf-8 -*- | ||
# Copyright 2018 New Vector Ltd | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import sys | ||
|
||
from ._base import Config | ||
|
||
|
||
class StatsConfig(Config): | ||
"""Stats Configuration | ||
Configuration for the behaviour of synapse's stats engine | ||
""" | ||
|
||
def read_config(self, config): | ||
self.stats_enable = True | ||
hawkowl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
self.stats_bucket_size = 86400 | ||
self.stats_retention = sys.maxsize | ||
stats_config = config.get("stats", None) | ||
if stats_config: | ||
self.stats_enable = stats_config.get("enable", self.stats_enable) | ||
self.stats_bucket_size = stats_config.get( | ||
"bucket_size", self.stats_bucket_size | ||
) | ||
self.stats_retention = stats_config.get("retention", self.stats_retention) | ||
|
||
def default_config(self, config_dir_path, server_name, **kwargs): | ||
return """ | ||
# Stats configuration | ||
# | ||
# stats: | ||
# enable: true | ||
hawkowl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# bucket_size: 86400 # 1 day | ||
# retention: 31536000 # 1 year | ||
hawkowl marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.