Merge pull request #612 from matrix-org/erikj/cache_size

Add environment variable SYNAPSE_CACHE_FACTOR, default it to 0.1
This commit is contained in:
Erik Johnston 2016-03-02 14:36:10 +00:00
commit 2a78dac60d
7 changed files with 41 additions and 9 deletions

View file

@ -130,6 +130,10 @@ class PresenceHandler(BaseHandler):
for state in active_presence
}
metrics.register_callback(
"user_to_current_state_size", lambda: len(self.user_to_current_state)
)
now = self.clock.time_msec()
for state in active_presence:
self.wheel_timer.insert(