Skip to content

Commit 02459b7

Browse files
committed
test: Auto-redact bench timing results
1 parent 6a7b15a commit 02459b7

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crates/cargo-test-support/src/compare.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,16 @@ fn add_common_redactions(subs: &mut snapbox::Redactions) {
178178
if let Some(alt_target) = try_alternate() {
179179
subs.insert("[ALT_TARGET]", alt_target).unwrap();
180180
}
181+
subs.insert(
182+
"[AVG_ELAPSED]",
183+
regex!("(?<redacted>[0-9]+(\\.[0-9]+)?) ns/iter"),
184+
)
185+
.unwrap();
186+
subs.insert(
187+
"[JITTER]",
188+
regex!("ns/iter \\(\\+/- (?<redacted>[0-9]+(\\.[0-9]+)?)\\)"),
189+
)
190+
.unwrap();
181191
}
182192

183193
static MIN_LITERAL_REDACTIONS: &[(&str, &str)] = &[

0 commit comments

Comments
 (0)