mirror of
https://codeberg.org/icewind/palantir.git
synced 2026-06-03 10:14:09 +02:00
iai bench
This commit is contained in:
parent
0b77b8d6a3
commit
7537958e6c
3 changed files with 16 additions and 2 deletions
|
|
@ -19,3 +19,7 @@ once_cell = "1"
|
|||
|
||||
[dev-dependencies]
|
||||
iai = "0.1"
|
||||
|
||||
[[bench]]
|
||||
name = "iai"
|
||||
harness = false
|
||||
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);
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
pub mod heim;
|
||||
pub(crate) mod heim;
|
||||
mod zfs;
|
||||
|
||||
use crate::heim::*;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue