Allows to measure keys of type T with a Stopwatch.
T
Stopwatch
Measure with start, measure or measureAsync, retrieve the final measurements with get.
Retrieve all measure-results, requires that all stop-watches that have been started have also been stopped.
Automatically call start and the corresponding stop to measure the execution time of the given function.
measureAsync
Similar to measure, but await the promise as part of the measurement
The key to write the resulting measurement to
The function to measure
measure
Start a timer for the given key, and guards that this is the first time this key is started. Call IStoppableStopwatch#stop on the returned stopwatch to stop the timer.
Allows to measure keys of type
T
with aStopwatch
.Measure with start, measure or measureAsync, retrieve the final measurements with get.