test: Auto-redact bench timing results

This commit is contained in:
Scott Schafer 2024-06-10 12:21:06 -06:00
parent 6a7b15a61e
commit 02459b707f
No known key found for this signature in database

View File

@ -178,6 +178,16 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
if let Some(alt_target) = try_alternate() {
subs.insert("[ALT_TARGET]", alt_target).unwrap();
}
subs.insert(
"[AVG_ELAPSED]",
regex!("(?<redacted>[0-9]+(\\.[0-9]+)?) ns/iter"),
)
.unwrap();
subs.insert(
"[JITTER]",
regex!("ns/iter \\(\\+/- (?<redacted>[0-9]+(\\.[0-9]+)?)\\)"),
)
.unwrap();
}
static MIN_LITERAL_REDACTIONS: &[(&str, &str)] = &[