PerformanceTestBase Class

Provides a base class for performance tests.
See the Examples section of the PerformanceTest class for some examples.

Definition

Namespace: KGySoft.Diagnostics
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.1.0
C#
public abstract class PerformanceTestBase
Inheritance
Object    PerformanceTestBase
Derived

Constructors

PerformanceTestBaseInitializes a new instance of the PerformanceTestBase class

Properties

Collect Gets or sets whether GC.Collect should be called before running the test cases.
Default value: .
CpuAffinity Gets or sets the CPU affinity to be used for executing tests. If , or is too large for the executing system, then the affinity is not adjusted for the test.
Default value: null.
Iterations Gets or sets number of iterations of test cases. If greater than zero, then TestTime is ignored.
Default value: 0.
Repeat Gets or sets how many times the test cases should be repeated.
Default value: 1.
SortBySize Gets or sets whether the results should be sorted by the size of the produced result instead of iterations count or time results. Makes sense only if the test delegate has a return type and the returned value of a test case is always the same for each run.
Default value: .
TestName Gets or sets the name of the test.
TestTime Gets or sets the test duration, in milliseconds, for each test case and the warming-up sessions. If Iterations is greater than zero, then this property affects only the warm-up time.
Default value: 2000.
WarmUp Gets or sets whether there is an untested warm-up session before each test. Its duration equals to TestTime.
Default value: .

Methods

DoTest In a derived class performs the test and returns the test results.

Extension Methods

Convert Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions)
ConvertTTarget Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions)
In Gets whether item is among the elements of set.
See the Examples section of the generic InT(T, T) overload for an example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)

See Also