Skip to content

latest

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 13 Apr 15:18
· 0 commits to c755dc088b5fc15b65f7b5537c34f7a90b228e2c since this release
Use separate tokio::watch::Sender for memory state and memory readings

Summary:
The places we listen to events from the memory tracker (pressure span reporter, local actions throttle) only care about the state change, not the reading.

This is a small optimization so that they don't need to react to an event every tick, only on state changes. This makes sense to simplify since we will need to react to state changes in more places later, inside the memory tracker (to freeze actions, etc.).

We will want a watcher for the reading itself later for the snapshot collector, so I added a separate watcher for that and adapted the existing tests to check it.

Reviewed By: Will-MingLun-Li

Differential Revision: D81171490

fbshipit-source-id: 22ab5cbabc5f2d1c2376b599c5cb2813a639ad93