//! Benchmarks for `time`. //! //! These benchmarks are not very precise, but they're good enough to catch major performance //! regressions. Run them if you think that may be the case. CI **does not** run benchmarks.
#![allow(
clippy::std_instead_of_core,
clippy::std_instead_of_alloc,
clippy::alloc_instead_of_core,
reason = "irrelevant for benchmarks"
)] #![allow(
clippy::missing_docs_in_private_items,
reason = "may be removed in the future"
)]
::criterion::criterion_group! {
name = benches;
config = ::criterion::Criterion::default() // Set a stricter statistical significance threshold ("p-value") // for deciding what's an actual performance change vs. noise. // The more benchmarks, the lower this needs to be in order to // not get lots of false positives.
.significance_level(0.0001) // Ignore any performance change less than this (0.05 = 5%) as // noise, regardless of statistical significance.
.noise_threshold(0.05) // Reduce the time taken to run each benchmark
.warm_up_time(::std::time::Duration::from_millis(100))
.measurement_time(::std::time::Duration::from_millis(500));
targets = $($fn_name,)*
}
};
}
mods![ mod date; mod duration; mod formatting; mod instant; mod month; mod offset_date_time; mod parsing; mod primitive_date_time; mod rand08; mod rand09; mod time; mod utc_offset; mod util; mod weekday;
];
/// Shuffle a slice in a random but deterministic manner. fn shuffle<T, const N: usize>(mut slice: [T; N]) -> [T; N] { use ::rand09::prelude::*;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.