Class MetricsCollectorSelector
Strategy pattern that's used to determine how to pick the appropriate MetricCollector based on platform dependencies and user-preferences.
Inheritance
Inherited Members
Namespace: NBench.Collection
Assembly: NBench.dll
Syntax
public abstract class MetricsCollectorSelector
Constructors
MetricsCollectorSelector(MetricName)
Declaration
protected MetricsCollectorSelector(MetricName name)
Parameters
Type | Name | Description |
---|---|---|
MetricName | name |
MetricsCollectorSelector(MetricName, SysInfo)
Declaration
protected MetricsCollectorSelector(MetricName name, SysInfo systemInfo)
Parameters
Type | Name | Description |
---|---|---|
MetricName | name | |
SysInfo | systemInfo |
Properties
Name
The name of the underlying MetricCollector. Will be used in the counter regardless of the implementation selected.
Declaration
public MetricName Name { get; }
Property Value
Type | Description |
---|---|
MetricName |
SystemInfo
Information about the current runtime - used in the course of making decisions about tool selection and management
Declaration
public SysInfo SystemInfo { get; }
Property Value
Type | Description |
---|---|
SysInfo |
Methods
Create(RunMode, IBenchmarkSetting)
Creates an instance for all applicable MetricCollectors for this metric type.
Declaration
public MetricCollector Create(RunMode runMode, IBenchmarkSetting setting)
Parameters
Type | Name | Description |
---|---|---|
RunMode | runMode | The RunMode for this benchmark. Influences the type of MetricCollector used in some instances. |
IBenchmarkSetting | setting | An implementation-specific IBenchmarkSetting |
Returns
Type | Description |
---|---|
MetricCollector | A new MetricCollector instance. |
Create(RunMode, WarmupData, IBenchmarkSetting)
Creates an instance for all applicable MetricCollectors for this metric type.
Declaration
public abstract MetricCollector Create(RunMode runMode, WarmupData warmup, IBenchmarkSetting setting)
Parameters
Type | Name | Description |
---|---|---|
RunMode | runMode | The RunMode for this benchmark. Influences the type of MetricCollector used in some instances. |
WarmupData | warmup | Warmup data. Influences the type of MetricCollector used in some instances. |
IBenchmarkSetting | setting | An implementation-specific IBenchmarkSetting |
Returns
Type | Description |
---|---|
MetricCollector | A new MetricCollector instance. |