use aktrs::actor::{self, SpawnOptions}; use criterion::{criterion_group, criterion_main, BatchSize, Criterion}; fn ring(c: &mut Criterion) { #[path = "../examples/ring.rs"] #[allow(dead_code)] mod ex; c.bench_function("ring[64 actors, 128 message loops]", |b| { b.iter_batched( || actor::System::new().expect("failed to create actor system"), |mut sys| { sys.spawn(ex::coordinator(64, 128), SpawnOptions::default()); sys.run().expect("actor system failed to run") }, BatchSize::SmallInput, ) }); } criterion_group!(benches, ring); criterion_main!(benches);