[−][src]Struct benchlib::benching::Bencher
Methods
impl Bencher[src]
pub fn new() -> Self[src]
pub fn set_iterations(&mut self, iterations: usize) -> &mut Self[src]
Sets the number of iterations a benchmark will be run If set to 0 it iterates until the standard deviation is below 1%
pub fn set_max_iterations(&mut self, iterations: usize) -> &mut Self[src]
pub fn bench<T, F: FnMut() -> T>(&mut self, name: &str, func: F) -> &mut Self[src]
Benchmarks a closure a configured number of times. The result will be printed to the console with the given name.
pub fn compare(&mut self) -> &mut Self[src]
Compares the last two benchmarks If the number of benchmarks is below 2 it doesn't do anything
pub fn print_settings(&mut self) -> &mut Self[src]
Prints the settings of the Bencher
pub fn write_output_to(&mut self, writer: BufWriter<File>) -> &mut Self[src]
Adds a file to write the output to
pub fn flush(&mut self) -> Result<()>[src]
Auto Trait Implementations
impl RefUnwindSafe for Bencher
impl Send for Bencher
impl Sync for Bencher
impl Unpin for Bencher
impl UnwindSafe for Bencher
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>,