pub struct WalltimeBenchmark { /* private fields */ }Implementations§
Source§impl WalltimeBenchmark
impl WalltimeBenchmark
Sourcepub fn collect_raw_walltime_results(
scope: &str,
name: String,
uri: String,
iters_per_round: Vec<u128>,
times_per_round_ns: Vec<u128>,
max_time_ns: Option<u128>,
)
pub fn collect_raw_walltime_results( scope: &str, name: String, uri: String, iters_per_round: Vec<u128>, times_per_round_ns: Vec<u128>, max_time_ns: Option<u128>, )
Entry point called in patched integration to harvest raw walltime data
CODSPEED_CARGO_WORKSPACE_ROOT is expected to be set for this to work
§Arguments
scope: The used integration, e.g. “divan” or “criterion”name: The name of the benchmarkuri: The URI of the benchmarkiters_per_round: The number of iterations for each round (=sample_size), e.g.[1, 2, 3](variable) or[2, 2, 2, 2](constant).times_per_round_ns: The measured time for each round in nanoseconds, e.g.[1000, 2000, 3000]max_time_ns: The time limit for the benchmark in nanoseconds (if defined)
§Pseudo-code
let sample_count = /* The number of executions for the same benchmark. */
let sample_size = iters_per_round = vec![/* The number of iterations within each sample. */];
for round in 0..sample_count {
let times_per_round_ns = 0;
for iteration in 0..sample_size[round] {
run_benchmark();
times_per_round_ns += /* measured execution time */;
}
}pub fn from_runtime_data( name: String, uri: String, iters_per_round: Vec<u128>, times_per_round_ns: Vec<u128>, max_time_ns: Option<u128>, ) -> Self
pub fn is_invalid(&self) -> bool
pub fn name(&self) -> &str
Trait Implementations§
Source§impl Debug for WalltimeBenchmark
impl Debug for WalltimeBenchmark
Source§impl<'de> Deserialize<'de> for WalltimeBenchmark
impl<'de> Deserialize<'de> for WalltimeBenchmark
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for WalltimeBenchmark
impl RefUnwindSafe for WalltimeBenchmark
impl Send for WalltimeBenchmark
impl Sync for WalltimeBenchmark
impl Unpin for WalltimeBenchmark
impl UnsafeUnpin for WalltimeBenchmark
impl UnwindSafe for WalltimeBenchmark
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more