public interface Stopwatch
| Modifier and Type | Method and Description |
|---|---|
void |
activate(java.lang.String name)
Start a stopwatch where subsequent operations in the current asynchronous scope will propagate the stopwatch; such as within the scope of an Akka Stream operator.
|
<T> T |
start(java.lang.String name,
scala.Function0<T> block)
Start a stopwatch where the operations in the block will propagate the stopwatch.
|
void |
start(java.lang.String name,
java.lang.Runnable runnable)
Start a stopwatch where the operations in the runnable will propagate the stopwatch.
|
void |
stop(java.lang.String name)
Stop an active stopwatch with the specified name creating a user defined time interval.
|
<T> T |
wrap(java.lang.String name,
scala.Function0<T> block)
Run the block within a stopwatch start and stop, to create a user defined time interval.
|
void |
wrap(java.lang.String name,
java.lang.Runnable runnable)
Run the runnable within a stopwatch start and end, to create a user defined time interval.
|
<T> T wrap(java.lang.String name,
scala.Function0<T> block)
T - return type of blockname - name of the stopwatchblock - block of code to run within the time intervalvoid wrap(java.lang.String name,
java.lang.Runnable runnable)
name - name of the stopwatchrunnable - runnable to run within the time interval<T> T start(java.lang.String name,
scala.Function0<T> block)
T - return type of blockname - name of the stopwatchblock - block of code to run within the stopwatch start scopevoid start(java.lang.String name,
java.lang.Runnable runnable)
name - name of the stopwatchrunnable - runnable to run within the stopwatch start scopevoid activate(java.lang.String name)
name - name of the stopwatchvoid stop(java.lang.String name)
name - name of the stopwatch to stopCinnamon API. Copyright (c) 2015–2021 Lightbend.