chore: checkpoint before Python removal

This commit is contained in:
2026-03-26 22:33:59 +00:00
parent 683cec9307
commit e568ddf82a
29972 changed files with 11269302 additions and 2 deletions

30
vendor/time/benchmarks/rand08.rs vendored Normal file
View File

@@ -0,0 +1,30 @@
use criterion::Bencher;
use rand08::rngs::mock::StepRng;
use rand08::Rng;
use time::{Date, Duration, Month, OffsetDateTime, PrimitiveDateTime, Time, UtcOffset, Weekday};
macro_rules! bench_rand {
($($name:ident : $type:ty),* $(,)?) => {
setup_benchmark! {
"Random",
$(fn $name(ben: &mut Bencher<'_>) {
iter_batched_ref!(
ben,
|| StepRng::new(0, 1),
[|rng| rng.r#gen::<$type>()]
);
})*
}
}
}
bench_rand![
time: Time,
date: Date,
utc_offset: UtcOffset,
primitive_date_time: PrimitiveDateTime,
offset_date_time: OffsetDateTime,
duration: Duration,
weekday: Weekday,
month: Month,
];