public class Measure extends Object
| Modifier and Type | Method and Description |
|---|---|
<V> V |
call(Callable<V> callable)
Measure the invokation time of the given Callable.
|
Measure |
every(Integer iterations)
If provided, the average on a single invokation will be calculated/logged after every n-iterations.
|
void |
finish()
This method can be called to print the total amount of time taken until that point in time.
|
static Measure |
measure(String what)
Builds a new Measure object to measure invokations of runnables/callables.
|
void |
run(ExceptionalRunnable runnable)
Measure the invokation time of the given ExceptionalRunnable.
|
void |
runnable(Runnable runnable)
Measure the invokation time of the given Runnable (without Exception).
|
Measure |
total(boolean total) |
public static Measure measure(String what)
public Measure every(Integer iterations)
public void finish()
public Measure total(boolean total)
public void runnable(Runnable runnable)
public void run(ExceptionalRunnable runnable) throws Exception
ExceptionCopyright © 2017. All rights reserved.