add bench for additional precision v7

This commit is contained in:
Ashley Mannix 2025-02-26 14:39:07 +10:00
parent 6c4597ca0f
commit c46f4e089d

View File

@ -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();