C# Class PerformanceTest.Benchmark

Inheritance: IDisposable
Show file Open project: khalidsalomao/SimpleHelpers.Net Class Usage Examples

Public Methods

Method Description
Benchmark ( string opName ) : System
Dispose ( ) : void
PrepareSystemForBenchmark ( ) : void

Prepares the system for benchmark will force Garbage Collection to run with maximum generation and wait it to finish.

Start ( bool skipWarmupGC = false ) : Benchmark
Start ( string opName ) : Benchmark
Stop ( ) : System.TimeSpan
Time ( string opName, System.Action action ) : System.TimeSpan
Time ( string opName, System.Action action, int loopCount, bool warmup ) : System.TimeSpan
ToString ( ) : string

Method Details

Benchmark() public method

public Benchmark ( string opName ) : System
opName string
return System

Dispose() public method

public Dispose ( ) : void
return void

PrepareSystemForBenchmark() public static method

Prepares the system for benchmark will force Garbage Collection to run with maximum generation and wait it to finish.
public static PrepareSystemForBenchmark ( ) : void
return void

Start() public method

public Start ( bool skipWarmupGC = false ) : Benchmark
skipWarmupGC bool
return Benchmark

Start() public static method

public static Start ( string opName ) : Benchmark
opName string
return Benchmark

Stop() public method

public Stop ( ) : System.TimeSpan
return System.TimeSpan

Time() public static method

public static Time ( string opName, System.Action action ) : System.TimeSpan
opName string
action System.Action
return System.TimeSpan

Time() public static method

public static Time ( string opName, System.Action action, int loopCount, bool warmup ) : System.TimeSpan
opName string
action System.Action
loopCount int
warmup bool
return System.TimeSpan

ToString() public method

public ToString ( ) : string
return string