diff options
author | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2019-08-27 13:50:58 +0100 |
---|---|---|
committer | Olivier Wilkinson (reivilibre) <olivier@librepush.net> | 2019-08-27 13:50:58 +0100 |
commit | 09cbc3a8e9c0f494fb272cb3761024a851b3e3f8 (patch) | |
tree | a94132bb26c4d4fcec610cb6b24dffe346808a93 /synapse/storage | |
parent | Code formatting (Black) (diff) | |
download | synapse-09cbc3a8e9c0f494fb272cb3761024a851b3e3f8.tar.xz |
Switch to milliseconds in room/user stats for consistency.
Signed-off-by: Olivier Wilkinson (reivilibre) <olivier@librepush.net>
Diffstat (limited to 'synapse/storage')
-rw-r--r-- | synapse/storage/schema/delta/56/stats_separated1.sql | 2 | ||||
-rw-r--r-- | synapse/storage/stats.py | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/schema/delta/56/stats_separated1.sql b/synapse/storage/schema/delta/56/stats_separated1.sql index 95daf8f53b..045b5ca013 100644 --- a/synapse/storage/schema/delta/56/stats_separated1.sql +++ b/synapse/storage/schema/delta/56/stats_separated1.sql @@ -84,7 +84,7 @@ CREATE TABLE IF NOT EXISTS room_stats_current ( -- represents HISTORICAL room statistics for a room CREATE TABLE IF NOT EXISTS room_stats_historical ( room_id TEXT NOT NULL, - -- These stats cover the time from (end_ts - bucket_size)...end_ts (in seconds). + -- These stats cover the time from (end_ts - bucket_size)...end_ts (in ms). -- Note that end_ts is quantised. end_ts BIGINT NOT NULL, bucket_size INT NOT NULL, diff --git a/synapse/storage/stats.py b/synapse/storage/stats.py index 650c0050cb..35fca1dc7b 100644 --- a/synapse/storage/stats.py +++ b/synapse/storage/stats.py @@ -64,7 +64,8 @@ class StatsStore(StateDeltasStore): Quantises a timestamp to be a multiple of the bucket size. Args: - ts (int): the timestamp to quantise, in seconds since the Unix Epoch + ts (int): the timestamp to quantise, in milliseconds since the Unix + Epoch Returns: int: a timestamp which |