C# 클래스 NBench.BenchmarkContext

Contains the runtime context for a given benchmark run. Makes it possible for developers to access built-in Counters declared via the CounterMeasurementAttribute, CounterThroughputAssertionAttribute, and CounterTotalAssertionAttribute classes.
파일 보기 프로젝트 열기: petabridge/NBench 1 사용 예제들

공개 메소드들

메소드 설명
BenchmarkContext ( Counter>.IReadOnlyDictionary counters, IBenchmarkTrace trace ) : System
CounterExists ( string name ) : bool

Determines if a counter with a particular name has been registered or not.

GetCounter ( string name ) : Counter

Retrieves a named Counter instance that has already been registered via a CounterMeasurementAttribute, CounterThroughputAssertionAttribute, or CounterTotalAssertionAttribute classes.

메소드 상세

BenchmarkContext() 공개 메소드

public BenchmarkContext ( Counter>.IReadOnlyDictionary counters, IBenchmarkTrace trace ) : System
counters Counter>.IReadOnlyDictionary
trace IBenchmarkTrace
리턴 System

CounterExists() 공개 메소드

Determines if a counter with a particular name has been registered or not.
public CounterExists ( string name ) : bool
name string The name of the counter.
리턴 bool

GetCounter() 공개 메소드

Retrieves a named Counter instance that has already been registered via a CounterMeasurementAttribute, CounterThroughputAssertionAttribute, or CounterTotalAssertionAttribute classes.
public GetCounter ( string name ) : Counter
name string The name of the counter.
리턴 Counter