[−][src]Struct rayon_logs::Comparator
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]
self,
label: STR,
algorithm: A
) -> Self where
A: Fn() + Send + Sync,
STR: Into<String>,
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]
A: Fn() + Send + Sync,
STR: Into<String>,
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]
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>,
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]
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>,
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,