element-synapse/tests
Erik Johnston 5408101d21
Speed up pruning of ratelimiter (#19129)
I noticed this in some profiling. Basically, we prune the ratelimiters
by copying and iterating over every entry every 60 seconds. Instead,
let's use a wheel timer to track when we should potentially prune a
given key, and then we a) check fewer keys, and b) can run more
frequently. Hopefully this should mean we don't have a large pause
everytime we prune a ratelimiter with lots of keys.

Also fixes a bug where we didn't prune entries that were added via
`record_action` and never subsequently updated. This affected the media
and joins-per-room ratelimiter.
2025-11-04 12:44:57 +00:00
..
api Speed up pruning of ratelimiter (#19129) 2025-11-04 12:44:57 +00:00
app Fix lost logcontext on HomeServer.shutdown() (#19108) 2025-11-03 14:07:10 -06:00
appservice Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
config Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
crypto Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
events Fix "There is no current event loop in thread" error in tests (#19134) 2025-11-04 12:32:49 +00:00
federation Speed up pruning of ratelimiter (#19129) 2025-11-04 12:44:57 +00:00
handlers Speed up pruning of ratelimiter (#19129) 2025-11-04 12:44:57 +00:00
http Move reading of multipart response into try body (#19062) 2025-10-30 15:22:52 +00:00
logging Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
media Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
metrics Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
module_api Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
push Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
replication Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
rest Pydantic v2 (#19071) 2025-10-31 09:22:22 +00:00
scripts Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
server_notices Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
state Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
storage Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
synapse_rust Wrap the Rust HTTP client with make_deferred_yieldable (#18903) 2025-10-02 13:00:50 -05:00
test_utils Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
types Support for room version 12 2025-08-11 16:43:45 +01:00
util Update check_dependencies to support markers (#19110) 2025-10-30 21:33:29 +00:00
__init__.py Correctly mention previous copyright (#16820) 2024-01-23 11:26:48 +00:00
server.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_distributor.py Cleanly shutdown SynapseHomeServer object (#18828) 2025-10-01 02:42:09 +00:00
test_event_auth.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_mau.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_phone_home.py Move unique snowflake homeserver background tasks to start_background_tasks (#19037) 2025-10-13 10:19:09 -05:00
test_rust.py Add missing type hints to tests. (#15027) 2023-02-08 19:52:37 +00:00
test_server.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_state.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_terms_auth.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_types.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_visibility.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
unittest.py Fix lost logcontext when using timeout_deferred(...) (#19090) 2025-10-30 11:49:15 -05:00
utils.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00