KGy SOFT

PerformanceTestBase Class

KGy SOFT Core Libraries Help
Provides a base class for performance tests.
See the Examples section of the PerformanceTest class for some examples.
Inheritance Hierarchy

SystemObject
  KGySoft.DiagnosticsPerformanceTestBase
    KGySoft.DiagnosticsPerformanceTestBaseTDelegate, TResult

Namespace:  KGySoft.Diagnostics
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public abstract class PerformanceTestBase

The PerformanceTestBase type exposes the following members.

Constructors

  NameDescription
Protected methodPerformanceTestBase
Initializes a new instance of the PerformanceTestBase class
Top
Properties

  NameDescription
Public propertyCollect
Gets or sets whether GC.Collect should be called before running the test cases.
Default value: .
Public propertyCpuAffinity
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: 2.
Public propertyIterations
Gets or sets number of iterations of test cases. If greater than zero, then TestTime is ignored.
Default value: 0.
Public propertyRepeat
Gets or sets how many times the test cases should be repeated.
Default value: 1.
Public propertySortBySize
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: .
Public propertyTestName
Gets or sets the name of the test.
Public propertyTestTime
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 is ignored.
Default value: 2000.
Public propertyWarmUp
Gets or sets whether there is an untested warm-up session before each test. Its duration or iteration count equals to TestTime or Iterations, respectively.
Default value: .
Top
Methods

  NameDescription
Public methodDoTest
In a derived class performs the test and returns the test results.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Extension Methods

  NameDescription
Public Extension MethodConvert(Type, CultureInfo)Overloaded.
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.)
Public Extension MethodCode exampleConvertTTarget(CultureInfo)Overloaded.
Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions.)
Public Extension MethodIn (Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvert(Type, CultureInfo, Object)Overloaded.
Tries to convert an Object specified in the obj parameter to the desired targetType.
(Defined by ObjectExtensions.)
Public Extension MethodTryConvertTTarget(TTarget)Overloaded.
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.)
Public Extension MethodTryConvertTTarget(CultureInfo, TTarget)Overloaded.
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.)
Top
See Also

Reference