net: Measure memory usage of storage thread. (#37053)

Our persistent localstorage data can be meaningfully large after testing
real world sites. This change ensures it shows up in about:memory.

Testing: Opened about:memory after launching the browser with a
persistent config
Fixes: Part of #11559

Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
Josh Matthews 2025-05-20 10:50:02 -04:00 committed by GitHub
parent 5b2305784a
commit 603ae44bcd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 46 additions and 5 deletions

View file

@ -4,6 +4,7 @@
use ipc_channel::ipc::IpcSender;
use malloc_size_of_derive::MallocSizeOf;
use profile_traits::mem::ReportsChan;
use serde::{Deserialize, Serialize};
use servo_url::ServoUrl;
@ -45,4 +46,7 @@ pub enum StorageThreadMsg {
/// send a reply when done cleaning up thread resources and then shut it down
Exit(IpcSender<()>),
/// Measure memory used by this thread and send the report over the provided channel.
CollectMemoryReport(ReportsChan),
}