Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
criterion::profiler::Profiler - Rust
[go: Go Back, main page]

[][src]Trait criterion::profiler::Profiler

pub trait Profiler {
    fn start_profiling(&mut self, benchmark_id: &str, benchmark_dir: &Path);
fn stop_profiling(&mut self, benchmark_id: &str, benchmark_dir: &Path); }

Extension trait for external crates to implement which provides start/stop hooks when profiling (but not when benchmarking) functions.

Required methods

fn start_profiling(&mut self, benchmark_id: &str, benchmark_dir: &Path)

This function is called when Criterion.rs starts profiling a particular benchmark. It provides the stringified benchmark ID and a path to a directory where the profiler can store its data.

fn stop_profiling(&mut self, benchmark_id: &str, benchmark_dir: &Path)

This function is called after Criterion.rs stops profiling a particular benchmark. The benchmark ID and directory are the same as in the call to start, provided for convenience.

Loading content...

Implementors

impl Profiler for ExternalProfiler[src]

Loading content...