iai bench

This commit is contained in:
Robin Appelman 2021-03-27 21:29:05 +01:00
commit 7537958e6c
3 changed files with 16 additions and 2 deletions

10
benches/iai.rs Normal file
View file

@ -0,0 +1,10 @@
use iai::black_box;
use palantir::get_metrics;
use tokio::runtime::Runtime;
fn iai_get_metrics() -> String {
let rt = Runtime::new().unwrap();
rt.block_on(async { black_box(get_metrics().await.unwrap()) })
}
iai::main!(iai_get_metrics);