C# 클래스 NBench.Sdk.Benchmark

Executor class for running a single PerfBenchmarkAttribute Exposes the BenchmarkContext, which allows developers to register custom metrics and counters for the use of their personal benchmarks.
파일 보기 프로젝트 열기: petabridge/NBench 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
StopWatch Stopwatch

보호된 프로퍼티들

프로퍼티 타입 설명
Builder NBench.Sdk.BenchmarkBuilder
WarmupData WarmupData

공개 메소드들

메소드 설명
AssertResults ( NBench.Reporting.BenchmarkResults result ) : NBench.Reporting.BenchmarkFinalResults
Benchmark ( NBench.Sdk.BenchmarkSettings settings, IBenchmarkInvoker invoker, IBenchmarkOutput writer ) : System

Backwards-compatible constructor for NBench 0.1.6 and earlier.

Uses the DefaultBenchmarkAssertionRunner to assert benchmark data.

Benchmark ( NBench.Sdk.BenchmarkSettings settings, IBenchmarkInvoker invoker, IBenchmarkOutput writer, IBenchmarkAssertionRunner benchmarkAssertions ) : System

Backwards-compatible constructor for NBench 0.1.6 and earlier.

CompileResults ( ) : NBench.Reporting.BenchmarkResults

Compiles all of the completed BenchmarkRuns into reports

Finish ( ) : void

Complete the benchmark

PrepareForRun ( ) : void

Performs any final GC needed before we start a test run

Run ( ) : void
Shutdown ( ) : void

보호된 메소드들

메소드 설명
PostRun ( ) : void

NOTE: We don't reset the Stopwatch on purpose here, so we can collect the value of it and use it for auto-tuning and reporting. It'll be started at the beginning of the next run.

PreRun ( ) : void
RunBenchmark ( ) : void

비공개 메소드들

메소드 설명
Allocate ( ) : void

Pre-allocate all of the objects we're going to need for this benchmark

Complete ( bool isEstimate = false ) : void

Complete the current run

HandleBenchmarkRunException ( Exception ex, string formatMsg ) : void
PrintWarmupOrRun ( bool isWarmup ) : string

Helper method for printing out the correct label to trace

RunSingleBenchmark ( ) : void
WarmUp ( ) : void

Warmup phase

메소드 상세

AssertResults() 공개 메소드

public AssertResults ( NBench.Reporting.BenchmarkResults result ) : NBench.Reporting.BenchmarkFinalResults
result NBench.Reporting.BenchmarkResults
리턴 NBench.Reporting.BenchmarkFinalResults

Benchmark() 공개 메소드

Backwards-compatible constructor for NBench 0.1.6 and earlier.
Uses the DefaultBenchmarkAssertionRunner to assert benchmark data.
public Benchmark ( NBench.Sdk.BenchmarkSettings settings, IBenchmarkInvoker invoker, IBenchmarkOutput writer ) : System
settings NBench.Sdk.BenchmarkSettings The settings for this benchmark.
invoker IBenchmarkInvoker The invoker used to execute benchmark and setup / cleanup methods.
writer IBenchmarkOutput The output target this benchmark will write to.
리턴 System

Benchmark() 공개 메소드

Backwards-compatible constructor for NBench 0.1.6 and earlier.
public Benchmark ( NBench.Sdk.BenchmarkSettings settings, IBenchmarkInvoker invoker, IBenchmarkOutput writer, IBenchmarkAssertionRunner benchmarkAssertions ) : System
settings NBench.Sdk.BenchmarkSettings The settings for this benchmark.
invoker IBenchmarkInvoker The invoker used to execute benchmark and setup / cleanup methods.
writer IBenchmarkOutput The output target this benchmark will write to.
benchmarkAssertions IBenchmarkAssertionRunner The assertion engine we'll use to perform BenchmarkAssertions against benchmarks.
리턴 System

CompileResults() 공개 메소드

Compiles all of the completed BenchmarkRuns into reports
public CompileResults ( ) : NBench.Reporting.BenchmarkResults
리턴 NBench.Reporting.BenchmarkResults

Finish() 공개 메소드

Complete the benchmark
public Finish ( ) : void
리턴 void

PostRun() 보호된 메소드

NOTE: We don't reset the Stopwatch on purpose here, so we can collect the value of it and use it for auto-tuning and reporting. It'll be started at the beginning of the next run.
protected PostRun ( ) : void
리턴 void

PreRun() 보호된 메소드

protected PreRun ( ) : void
리턴 void

PrepareForRun() 공개 정적인 메소드

Performs any final GC needed before we start a test run
public static PrepareForRun ( ) : void
리턴 void

Run() 공개 메소드

public Run ( ) : void
리턴 void

RunBenchmark() 보호된 메소드

protected RunBenchmark ( ) : void
리턴 void

Shutdown() 공개 메소드

public Shutdown ( ) : void
리턴 void

프로퍼티 상세

Builder 보호되어 있는 프로퍼티

protected BenchmarkBuilder,NBench.Sdk Builder
리턴 NBench.Sdk.BenchmarkBuilder

StopWatch 공개적으로 프로퍼티

Stopwatch used by the Benchmark. Exposed only for testing purposes.
public Stopwatch StopWatch
리턴 Stopwatch

WarmupData 보호되어 있는 프로퍼티

protected WarmupData,NBench.Sdk WarmupData
리턴 WarmupData