synapse/tests/handlers
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
..
__init__.py
oidc_test_key.p8
oidc_test_key.pub.pem
test_admin.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_appservice.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_auth.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_cas.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_deactivate_account.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_device.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_directory.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_e2e_keys.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_e2e_room_keys.py Remove MockClock() (#18992) 2025-09-30 11:27:29 -05:00
test_federation_event.py Fix server_name in logging context for multiple Synapse instances in one process (#18868) 2025-09-26 17:10:48 -05:00
test_federation.py Fix server_name in logging context for multiple Synapse instances in one process (#18868) 2025-09-26 17:10:48 -05:00
test_message.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_oauth_delegation.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_oidc.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_password_providers.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_presence.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00
test_profile.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_receipts.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_register.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_room_list.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_room_member.py Speed up pruning of ratelimiter (#19129) 2025-11-04 12:44:57 +00:00
test_room_policy.py Use signature support from policy servers when available (#18934) 2025-09-25 19:30:24 +00:00
test_room_summary.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_room.py Add missing type hints to tests.handlers. (#14680) 2022-12-16 11:53:01 +00:00
test_saml.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_send_email.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_sliding_sync.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_sso.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_stats.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_sync.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_typing.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_user_directory.py Use type hinting generics in standard collections (#19046) 2025-10-22 16:48:19 -05:00
test_worker_lock.py Introduce Clock.call_when_running(...) to include logcontext by default (#18944) 2025-09-22 10:27:59 -05:00