C# Class Aspectacular.Test.RunCounter

Datei anzeigen Open project: vgribok/Aspectacular Class Usage Examples

Public Methods

Method Description
Spin ( long millisecondsToRun, System.Action funcToTest ) : long

Counts how many time certain function was executed in a given time span.

SpinParallel ( long millisecondsToRun, System.Action funcToTest ) : long

Runs given function in parallel on multiple tasks. Number of tasks spawned matches number of logical processors.

SpinParallelPerSec ( long millisecondsToRun, System.Action funcToTest ) : long

Runs a function for given time span, and return average runs per second. Number of tasks spawned matches number of logical processors.

SpinPerSec ( long millisecondsToRun, System.Action funcToTest ) : long

Runs a function for given time span, and return average runs per second.

Method Details

Spin() public static method

Counts how many time certain function was executed in a given time span.
public static Spin ( long millisecondsToRun, System.Action funcToTest ) : long
millisecondsToRun long
funcToTest System.Action
return long

SpinParallel() public static method

Runs given function in parallel on multiple tasks. Number of tasks spawned matches number of logical processors.
public static SpinParallel ( long millisecondsToRun, System.Action funcToTest ) : long
millisecondsToRun long
funcToTest System.Action
return long

SpinParallelPerSec() public static method

Runs a function for given time span, and return average runs per second. Number of tasks spawned matches number of logical processors.
public static SpinParallelPerSec ( long millisecondsToRun, System.Action funcToTest ) : long
millisecondsToRun long
funcToTest System.Action
return long

SpinPerSec() public static method

Runs a function for given time span, and return average runs per second.
public static SpinPerSec ( long millisecondsToRun, System.Action funcToTest ) : long
millisecondsToRun long
funcToTest System.Action
return long