mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 18:24:08 +02:00
iai bench
This commit is contained in:
parent
0b77b8d6a3
commit
7537958e6c
3 changed files with 16 additions and 2 deletions
10
benches/iai.rs
Normal file
10
benches/iai.rs
Normal 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);
|
||||
Loading…
Add table
Add a link
Reference in a new issue