Struct tango_bench::Benchmark

source ·
pub struct Benchmark<H, N, O> { /* private fields */ }

Implementations§

source§

impl<H, N, O> Benchmark<H, N, O>

source

pub fn add_reporter(&mut self, reporter: impl Reporter + 'static)

source

pub fn add_generator( &mut self, generator: impl Generator<Haystack = H, Needle = N> + 'static )

source

pub fn add_generators<T>(&mut self, generators: impl IntoIterator<Item = T>)where T: Generator<Haystack = H, Needle = N> + 'static,

source

pub fn add_pair( &mut self, baseline: impl BenchmarkFn<H, N, O> + 'static, candidate: impl BenchmarkFn<H, N, O> + 'static )

source

pub fn run_by_name( &mut self, reporter: &mut dyn Reporter, name_filter: &str, opts: &MeasurementSettings, samples_dump: Option<impl AsRef<Path>> )

source

pub fn run_calibration(&mut self)

source

pub fn list_functions(&self) -> impl Iterator<Item = &str>

Trait Implementations§

source§

impl<H, N, O> Default for Benchmark<H, N, O>

source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

§

impl<H, N, O> !RefUnwindSafe for Benchmark<H, N, O>

§

impl<H, N, O> !Send for Benchmark<H, N, O>

§

impl<H, N, O> !Sync for Benchmark<H, N, O>

§

impl<H, N, O> Unpin for Benchmark<H, N, O>

§

impl<H, N, O> !UnwindSafe for Benchmark<H, N, O>

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.