rokdocs
v0.1

rok::core::bench

rok::core::bench - the engine rokc bench drives (spec 9.9.11).

A #[bench] fn takes a Bench and calls iter on the code to measure; work set up outside iter is not timed. iter calibrates the call count, warms up, samples, and reports median (+/- MAD) with Tukey outlier detection and GC-aware sample classification. Statistics and formatting live here; the driver only orchestrates the processes.

Structs

Bench

pub struct Bench
  • pub fn new(name: str, iters: i64, samples: i64, tty: bool, width: usize) -> Bench
  • pub fn bytes(ref self, n: i64)
  • pub fn items(ref self, n: i64)
  • pub fn iter<T>(ref self, f: fn() -> T)