mirror of
https://gitlab.com/fabinfra/fabaccess/bffh.git
synced 2024-11-11 01:53:23 +01:00
26 lines
444 B
Rust
26 lines
444 B
Rust
#![feature(test)]
|
|
|
|
extern crate test;
|
|
|
|
use bastion_executor::prelude::*;
|
|
use lightproc::proc_stack::ProcStack;
|
|
use test::{black_box, Bencher};
|
|
|
|
#[bench]
|
|
fn increment(b: &mut Bencher) {
|
|
let mut sum = 0;
|
|
|
|
b.iter(|| {
|
|
run(
|
|
async {
|
|
(0..10_000_000).for_each(|_| {
|
|
sum += 1;
|
|
});
|
|
},
|
|
ProcStack::default(),
|
|
);
|
|
});
|
|
|
|
black_box(sum);
|
|
}
|