Skip to main content

AutotuneLoggerExt

Trait AutotuneLoggerExt 

Source
pub trait AutotuneLoggerExt {
    // Required methods
    fn push_short_circuit(&mut self, name: String);
    fn push_tuning_step(&mut self, name: String, duration: Duration);
    fn set_bounds(&mut self, bounds: Option<Bounds>);
    fn set_limit(&mut self, limit: Option<Duration>);
    fn set_checks(&mut self, checks: impl FnOnce() -> Vec<CheckResult>);
    fn log_result<K: AutotuneKey>(
        &self,
        logger: &mut Logger,
        key: &K,
        results: &[AutotuneResult],
    );
}
Expand description

Extension trait for Option<AutotuneLogContext> and Option<&mut AutotuneLogContext>.

Required Methods§

Source

fn push_short_circuit(&mut self, name: String)

Pushes a short circuit event if logging is enabled.

Source

fn push_tuning_step(&mut self, name: String, duration: Duration)

Pushes a tuning step event if logging is enabled.

Source

fn set_bounds(&mut self, bounds: Option<Bounds>)

Sets the tuning bounds if logging is active.

Source

fn set_limit(&mut self, limit: Option<Duration>)

Sets the tuning limit if logging is active.

Source

fn set_checks(&mut self, checks: impl FnOnce() -> Vec<CheckResult>)

Sets checks if logging is active.

Source

fn log_result<K: AutotuneKey>( &self, logger: &mut Logger, key: &K, results: &[AutotuneResult], )

Logs the benchmark result if logging is enabled.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl AutotuneLoggerExt for Option<&mut AutotuneLogContext>

Source§

fn push_short_circuit(&mut self, name: String)

Source§

fn push_tuning_step(&mut self, name: String, duration: Duration)

Source§

fn set_bounds(&mut self, bounds: Option<Bounds>)

Source§

fn set_limit(&mut self, limit: Option<Duration>)

Source§

fn set_checks(&mut self, checks: impl FnOnce() -> Vec<CheckResult>)

Source§

fn log_result<K: AutotuneKey>( &self, logger: &mut Logger, key: &K, results: &[AutotuneResult], )

Source§

impl AutotuneLoggerExt for Option<AutotuneLogContext>

Source§

fn push_short_circuit(&mut self, name: String)

Source§

fn push_tuning_step(&mut self, name: String, duration: Duration)

Source§

fn set_bounds(&mut self, bounds: Option<Bounds>)

Source§

fn set_limit(&mut self, limit: Option<Duration>)

Source§

fn set_checks(&mut self, checks: impl FnOnce() -> Vec<CheckResult>)

Source§

fn log_result<K: AutotuneKey>( &self, logger: &mut Logger, key: &K, results: &[AutotuneResult], )

Implementors§