RobustBenchmark

Namespace: SnowBank.Numerics · class

Helper for measuring the results of benchmarks

Methods

Run

static Report<long> Run(Action test, int runs, int iterations, RobustHistogram h = null)

Runs a benchmark

static Report<long> Run<T>(Func<T> test, int runs, int iterations, RobustHistogram h = null)

Runs a benchmark

static Report<long> Run(Action<int> test, int runs, int iterations, RobustHistogram h = null)

Runs a benchmark

static Report<TResult> Run<TState, TResult>(TState state, Action<TState> test, Func<TState, TResult> cleanup, int runs, int iterations, RobustHistogram h = null)

Runs a benchmark

static Report<TResult> Run<TState, TResult>(TState state, Action<TState, int> test, Func<TState, TResult> cleanup, int runs, int iterations, RobustHistogram h = null)

Runs a benchmark

static Report<TResult> Run<TState, TResult, TIntermediate>(TState state, Func<TState, int, TIntermediate> test, Func<TState, TResult> cleanup, int runs, int iterations, RobustHistogram h = null)

Runs a benchmark

static Report<TResult> Run<TGlobal, TState, TResult, TIntermediate>(TGlobal global, Func<TGlobal, TState> setup, Func<TGlobal, TState, int, TIntermediate> test, Func<TGlobal, TState, TResult> cleanup, int runs, int iterations, RobustHistogram h = null)

Runs a benchmark

Warmup

static void Warmup()

Pre-JIT this type before starting a benchmark