Class SimpleTimingSummary
- java.lang.Object
-
- com.pervasivecode.utils.concurrent.timing.SimpleTimingSummary
-
- All Implemented Interfaces:
MultistageStopwatch.TimingSummary
public abstract class SimpleTimingSummary extends Object implements MultistageStopwatch.TimingSummary
A basic TimingSummary implememtation, with validation.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleTimingSummary.Builder
This object will build aSimpleTimingSummary
instance.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static SimpleTimingSummary.Builder
builder()
abstract long
numStartStopCycles()
Get the number of times that all timers belonging to this stopwatch have been started and then stopped.abstract Duration
totalElapsedTime()
Get the total amount of time used by all start-stop cycles of all timers belonging to this stopwatch.
-
-
-
Method Detail
-
totalElapsedTime
public abstract Duration totalElapsedTime()
Description copied from interface:MultistageStopwatch.TimingSummary
Get the total amount of time used by all start-stop cycles of all timers belonging to this stopwatch.This value is not likely to be equivalent to wall-clock time, since a MultistageStopwatch instance may be used to produce ActiveTimer instances belonging to separate, concurrently-executing threads.
- Specified by:
totalElapsedTime
in interfaceMultistageStopwatch.TimingSummary
- Returns:
- The total amount of time used by all timers belonging to this stopwatch.
-
numStartStopCycles
public abstract long numStartStopCycles()
Description copied from interface:MultistageStopwatch.TimingSummary
Get the number of times that all timers belonging to this stopwatch have been started and then stopped.- Specified by:
numStartStopCycles
in interfaceMultistageStopwatch.TimingSummary
- Returns:
- The number of start-then-stop cycles.
-
builder
public static SimpleTimingSummary.Builder builder()
-
-