public class Callback
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
Callback.Mode
Support for timing methodologies that have timing and warmup runs.
|
| Modifier and Type | Field and Description |
|---|---|
protected CommandLineArgs |
args
The parsed command line arguments
|
protected long |
elapsed |
protected int |
iterations
Iterations of the current benchmark completed so far
|
protected Callback.Mode |
mode |
protected long[] |
times
Times for the last n iterations of the current benchmark
|
| Constructor and Description |
|---|
Callback(CommandLineArgs args)
Create a new callback.
|
| Modifier and Type | Method and Description |
|---|---|
void |
complete(java.lang.String benchmark,
boolean valid) |
protected void |
complete(java.lang.String benchmark,
boolean valid,
boolean warmup) |
void |
init(Config config) |
boolean |
isWarmup() |
boolean |
runAgain()
This method governs the benchmark iteration process.
|
void |
start(java.lang.String benchmark)
Start the timer and announce the begining of an iteration
|
protected void |
start(java.lang.String benchmark,
boolean warmup) |
void |
stop(long duration) |
void |
stop(long duration,
boolean warmup) |
protected Callback.Mode mode
protected final CommandLineArgs args
protected int iterations
protected long[] times
protected long elapsed
public Callback(CommandLineArgs args)
args - The parsed command-line arguments.public void init(Config config)
public boolean runAgain()
public boolean isWarmup()
public void start(java.lang.String benchmark)
protected void start(java.lang.String benchmark,
boolean warmup)
public void stop(long duration)
public void stop(long duration,
boolean warmup)
public void complete(java.lang.String benchmark,
boolean valid)
protected void complete(java.lang.String benchmark,
boolean valid,
boolean warmup)