mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
net: Measure HSTS memory usage. (#36558)
Records the memory usage of the HSTS lists in the network thread. Testing: Verified the presence of the new reports for servo.org. Fixes: #35059 Signed-off-by: Josh Matthews <josh@joshmatthews.net>
This commit is contained in:
parent
94a9588bcc
commit
f16f625c9b
3 changed files with 27 additions and 24 deletions
|
@ -11,13 +11,14 @@ use embedder_traits::resources::{self, Resource};
|
|||
use headers::{HeaderMapExt, StrictTransportSecurity};
|
||||
use http::HeaderMap;
|
||||
use log::{error, info};
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use net_traits::IncludeSubdomains;
|
||||
use net_traits::pub_domains::reg_suffix;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_config::pref;
|
||||
use servo_url::{Host, ServoUrl};
|
||||
|
||||
#[derive(Clone, Debug, Deserialize, Serialize)]
|
||||
#[derive(Clone, Debug, Deserialize, MallocSizeOf, Serialize)]
|
||||
pub struct HstsEntry {
|
||||
pub host: String,
|
||||
pub include_subdomains: bool,
|
||||
|
@ -60,7 +61,7 @@ impl HstsEntry {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Default, Deserialize, Serialize)]
|
||||
#[derive(Clone, Debug, Default, Deserialize, MallocSizeOf, Serialize)]
|
||||
pub struct HstsList {
|
||||
pub entries_map: HashMap<String, Vec<HstsEntry>>,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue