Compare commits

..

2 Commits

Author SHA1 Message Date
John Nunley 0dd9528733
Merge df411fa7b7 into 2493d3c595 2024-04-15 22:16:37 -07:00
John Nunley df411fa7b7
tests: Add further testing
Co-authored-by: Jacob Rothstein <hi@jbr.me>
Signed-off-by: John Nunley <dev@notgull.net>
2024-04-15 22:16:23 -07:00
1 changed files with 2 additions and 6 deletions

View File

@ -6,13 +6,9 @@ const COUNT: usize = 8000;
fn bench_events(c: &mut Criterion) {
c.bench_function("notify_and_wait", |b| {
let ev = Event::new();
let mut handles = Vec::with_capacity(COUNT);
b.iter(|| {
let mut handles = Vec::with_capacity(COUNT);
for _ in 0..COUNT {
handles.push(ev.listen());
}
handles.extend(iter::repeat_with(|| ev.listen()).take(COUNT));
ev.notify(COUNT);
for handle in handles {