Skip to content

Commit c6e56a1

Browse files
committed
Sync OSS release
1 parent d450da5 commit c6e56a1

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

crates/runtime/tests/performance_claims.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,9 +382,12 @@ fn claim2_ecdsa_p256_verify_under_5ms() {
382382
println!("ECDSA P-256 verify only:");
383383
println!(" Average: {avg_us} µs ({avg_ms:.3} ms)");
384384

385+
// Debug builds are ~2× slower due to unoptimized crypto; use relaxed
386+
// threshold in CI (debug) while keeping the real claim for release.
387+
let threshold_ms = if cfg!(debug_assertions) { 10.0 } else { 5.0 };
385388
assert!(
386-
avg_ms < 5.0,
387-
"CLAIM VIOLATED: ECDSA verify {avg_ms:.3} ms >= 5 ms threshold"
389+
avg_ms < threshold_ms,
390+
"CLAIM VIOLATED: ECDSA verify {avg_ms:.3} ms >= {threshold_ms} ms threshold"
388391
);
389392
}
390393

0 commit comments

Comments
 (0)