mirror of
https://github.com/uuid-rs/uuid.git
synced 2025-09-27 04:50:59 +00:00
add bench for additional precision v7
This commit is contained in:
parent
6c4597ca0f
commit
c46f4e089d
@ -24,6 +24,13 @@ fn new_v7_context(b: &mut Bencher) {
|
||||
b.iter(|| Uuid::new_v7(Timestamp::now(&ctxt)));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn new_v7_context_additional_precision(b: &mut Bencher) {
|
||||
let ctxt = ContextV7::new().with_additional_precision();
|
||||
|
||||
b.iter(|| Uuid::new_v7(Timestamp::now(&ctxt)));
|
||||
}
|
||||
|
||||
#[bench]
|
||||
fn v7_raw(b: &mut Bencher) {
|
||||
let now = SystemTime::UNIX_EPOCH.elapsed().unwrap();
|
||||
|
Loading…
x
Reference in New Issue
Block a user