[][src]Struct rayon_logs::Comparator

pub struct Comparator<'a> { /* fields omitted */ }

The comparator structure enables you to easily compare performances of different algorithms.

It runs each algorithm several times before displaying some simple statistics and for each algorithm the median and best execution trace. See for example the filter_collect example.

Methods

impl<'a> Comparator<'a>[src]

pub fn runs_number(self, runs_wanted: usize) -> Self[src]

Sets the number of runs for each algorithm. PRECONDITION: call that BEFORE attaching algorithms

pub fn attach_algorithm_nodisplay<A, STR>(
    self,
    label: STR,
    algorithm: A
) -> Self where
    A: Fn() + Send + Sync,
    STR: Into<String>, 
[src]

Log an algorithm's performances but do not generate svg traces.

pub fn attach_algorithm<A, STR>(self, label: STR, algorithm: A) -> Self where
    A: Fn() + Send + Sync,
    STR: Into<String>, 
[src]

Log an algorithm's performances and generate svg traces.

pub fn attach_algorithm_nodisplay_with_setup<A, I, S, T, STR>(
    self,
    label: STR,
    setup_function: S,
    algorithm: A
) -> Self where
    S: FnMut() -> I,
    I: Send,
    A: Fn(I) -> T + Send + Sync,
    T: Send + Sync,
    STR: Into<String>, 
[src]

Log an algorithm but prepare an input (un-timed) for each execution. No svg traces.

pub fn attach_algorithm_with_setup<A, I, S, T, STR>(
    self,
    label: STR,
    setup_function: S,
    algorithm: A
) -> Self where
    S: FnMut() -> I,
    I: Send,
    A: Fn(I) -> T + Send + Sync,
    T: Send + Sync,
    STR: Into<String>, 
[src]

Log an algorithm but prepare an input (un-timed) for each execution. With svg traces.

pub fn generate_logs<P: AsRef<Path>>(self, filename: P) -> Result<(), Error>[src]

This method should be called in the end to write the logs to a desired html file.

Auto Trait Implementations

impl<'a> !RefUnwindSafe for Comparator<'a>

impl<'a> Send for Comparator<'a>

impl<'a> Sync for Comparator<'a>

impl<'a> Unpin for Comparator<'a>

impl<'a> !UnwindSafe for Comparator<'a>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,