chore: 移除单元测试中4个耗时benchmark测试函数

This commit is contained in:
2026-08-21 22:25:23 +08:00
parent 8d6742cc16
commit aa523fcd4c
2 changed files with 0 additions and 114 deletions
-23
View File
@@ -29,29 +29,6 @@ fn epoch_reset_increments_id() {
assert_eq!(epoch.current_id(), 2);
}
#[test]
fn epoch_benchmark_1m_allocations() {
let epoch = Epoch::new();
let start = Instant::now();
for i in 0..1_000_000u64 {
let ptr = epoch.alloc(i);
unsafe {
assert_eq!(*ptr, i);
}
}
let elapsed = start.elapsed();
if cfg!(debug_assertions) {
println!("1M allocations took {}ms (debug build - skipping timing assertion)", elapsed.as_millis());
} else {
assert!(
elapsed.as_millis() < 200,
"1M allocations took {}ms, expected <200ms",
elapsed.as_millis()
);
}
}
#[test]
fn persistent_new_and_deref() {