ParallelPerformanceTracker

public sealed class ParallelPerformanceTracker
A utility class for tracking performance under various degrees of parallelism.

Constructors

ParallelPerformanceTracker

#
Create a tracker with a default action.
public ParallelPerformanceTracker()

ParallelPerformanceTracker

#
public ParallelPerformanceTracker(
action
)

Properties

Action

#
Gets the action to invoke on every iteration.
public Action<int> Action { get; }

Methods

Measure

#
Measure performance across a range of degrees of parallelism.
public (int degree, TimeSpan duration)[] Measure(
iterations,
minDegree,
maxDegree
)

Measure

#
Compute a specific degree measurement asynchronously. Running this method more than one at the same time will taint the measurements, so be sure to await every call to this method.
public TimeSpan Measure(
iterations,
degree,
token
)