Skip to main content

BenchExt

Trait BenchExt 

Source
pub trait BenchExt<This>
where This: BenchAlg,
{ // Required methods fn one_at_a_time<Stated, Routine>( &self, group: &'static str, cases: Stated, ) -> This::Bench where Stated: IntoIterator<Item = (&'static str, Routine)>, Routine: FnMut(BenchRounds) -> Duration + 'static; fn together<Stated, Routine>( &self, group: &'static str, cases: Stated, ) -> This::Bench where Stated: IntoIterator<Item = (&'static str, Routine)>, Routine: FnMut(BenchRounds) -> Duration + Send + 'static; fn benches<Stated>(&self, stated: Stated) -> This::Bench where Stated: IntoIterator<Item = This::Bench>; }
Expand description

Derives the ways a bench states a group.

Required Methods§

Source

fn one_at_a_time<Stated, Routine>( &self, group: &'static str, cases: Stated, ) -> This::Bench
where Stated: IntoIterator<Item = (&'static str, Routine)>, Routine: FnMut(BenchRounds) -> Duration + 'static,

States one group whose cases are measured one at a time.

A routine stating Send is taken as well, since a case that may be measured beside others may also be measured alone.

Source

fn together<Stated, Routine>( &self, group: &'static str, cases: Stated, ) -> This::Bench
where Stated: IntoIterator<Item = (&'static str, Routine)>, Routine: FnMut(BenchRounds) -> Duration + Send + 'static,

States one group whose cases are measured at the same time.

Source

fn benches<Stated>(&self, stated: Stated) -> This::Bench
where Stated: IntoIterator<Item = This::Bench>,

States every group of stated, in the order stated.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<This> BenchExt<This> for This
where This: BenchAlg,

Derives the ways a bench states a group.