Class BenchmarkActionFactory
Helper class that creates BenchmarkAction instances.
Namespace: BenchmarkDotNet.Toolchains.InProcess
Assembly: BenchmarkDotNet.dll
Syntax
[Obsolete("Please use BenchmarkDotNet.Toolchains.InProcess.NoEmit.* classes")]
public static class BenchmarkActionFactory
Methods
CreateDummy()
Creates a dummy benchmark action.
Declaration
public static BenchmarkAction CreateDummy()
Returns
Type | Description |
---|---|
BenchmarkAction | Dummy benchmark action. |
CreateGlobalCleanup(Descriptor, Object)
Creates global cleanup benchmark action.
Declaration
public static BenchmarkAction CreateGlobalCleanup(Descriptor descriptor, object instance)
Parameters
Type | Name | Description |
---|---|---|
Descriptor | descriptor | Descriptor info. |
Object | instance | Instance of target. |
Returns
Type | Description |
---|---|
BenchmarkAction | Cleanup benchmark action. |
CreateGlobalSetup(Descriptor, Object)
Creates global setup benchmark action.
Declaration
public static BenchmarkAction CreateGlobalSetup(Descriptor descriptor, object instance)
Parameters
Type | Name | Description |
---|---|---|
Descriptor | descriptor | Descriptor info. |
Object | instance | Instance of target. |
Returns
Type | Description |
---|---|
BenchmarkAction | Setup benchmark action. |
CreateIterationCleanup(Descriptor, Object)
Creates global cleanup benchmark action.
Declaration
public static BenchmarkAction CreateIterationCleanup(Descriptor descriptor, object instance)
Parameters
Type | Name | Description |
---|---|---|
Descriptor | descriptor | Descriptor info. |
Object | instance | Instance of target. |
Returns
Type | Description |
---|---|
BenchmarkAction | Cleanup benchmark action. |
CreateIterationSetup(Descriptor, Object)
Creates global setup benchmark action.
Declaration
public static BenchmarkAction CreateIterationSetup(Descriptor descriptor, object instance)
Parameters
Type | Name | Description |
---|---|---|
Descriptor | descriptor | Descriptor info. |
Object | instance | Instance of target. |
Returns
Type | Description |
---|---|
BenchmarkAction | Setup benchmark action. |
CreateOverhead(Descriptor, Object, BenchmarkActionCodegen, Int32)
Creates idle benchmark action.
Declaration
public static BenchmarkAction CreateOverhead(Descriptor descriptor, object instance, BenchmarkActionCodegen codegenMode, int unrollFactor)
Parameters
Type | Name | Description |
---|---|---|
Descriptor | descriptor | Descriptor info. |
Object | instance | Instance of target. |
BenchmarkActionCodegen | codegenMode | Describes how benchmark action code is generated. |
Int32 | unrollFactor | Unroll factor. |
Returns
Type | Description |
---|---|
BenchmarkAction | Idle benchmark action. |
CreateWorkload(Descriptor, Object, BenchmarkActionCodegen, Int32)
Creates run benchmark action.
Declaration
public static BenchmarkAction CreateWorkload(Descriptor descriptor, object instance, BenchmarkActionCodegen codegenMode, int unrollFactor)
Parameters
Type | Name | Description |
---|---|---|
Descriptor | descriptor | Descriptor info. |
Object | instance | Instance of target. |
BenchmarkActionCodegen | codegenMode | Describes how benchmark action code is generated. |
Int32 | unrollFactor | Unroll factor. |
Returns
Type | Description |
---|---|
BenchmarkAction | Run benchmark action. |