public class StreamProgressListener extends Object implements ProgressListener
PrintStream
Modifier | Constructor and Description |
---|---|
protected |
StreamProgressListener()
Creates a Progress Listener without a stream
|
protected |
StreamProgressListener(boolean closeOnFinish)
Creates a Progress Listener without a stream
|
|
StreamProgressListener(OutputStream output)
Creates a new Progress Listener for the given stream
|
|
StreamProgressListener(OutputStream output,
boolean closeOnFinish)
Creates a new Progress Listener for the given stream
|
|
StreamProgressListener(PrintStream output)
Creates a new Progress Listener for the given stream
|
|
StreamProgressListener(PrintStream output,
boolean closeOnFinish)
Creates a new Progress Listener for the given stream
|
Modifier and Type | Method and Description |
---|---|
<T extends Options> |
afterOperation(Runner<T> runner,
T options,
Operation operation,
OperationRun run)
Invoked after each run of an operation
|
<T extends Options> |
afterOperationMix(Runner<T> runner,
T options,
OperationMix mix,
OperationMixRun run)
Invoked after each run of an operation mix
|
<T extends Options> |
beforeOperation(Runner<T> runner,
T options,
Operation operation)
Invoked before each run of an operation
|
<T extends Options> |
beforeOperationMix(Runner<T> runner,
T options,
OperationMix mix)
Invoked before each run of an operation mix
|
<T extends Options> |
finish(Runner<T> runner,
T options,
boolean ok)
Invoked when test runs finish
|
protected boolean |
hasSwitchedThreads() |
protected OutputStream |
openStream()
Internal method called only when this class is derived from and the
protected constructors which do not take a stream argument have been used
|
<T extends Options> |
progress(Runner<T> runner,
T options,
String message)
Invoked when an informational progress message is available
|
void |
setForceThreadedOutput(boolean force)
Sets whether to force threaded output i.e.
|
<T extends Options> |
start(Runner<T> runner,
T options)
Invoked when test runs start
|
protected void |
updateThread() |
protected StreamProgressListener(boolean closeOnFinish)
Usable only by derived classes, the openStream()
method will be
called to open a stream at the time benchmarking starts
closeOnFinish
- Whether the Output Stream should be closed when the listener
receives the #handleFinished(boolean)
callprotected StreamProgressListener()
Usable only by derived classes, the openStream()
method will be
called to open a stream at the time benchmarking starts
public StreamProgressListener(PrintStream output, boolean closeOnFinish)
output
- Output StreamcloseOnFinish
- Whether the Output Stream should be closed when the listener
receives the finish(Runner, Options, boolean)
callpublic StreamProgressListener(PrintStream output)
output
- Output Streampublic StreamProgressListener(OutputStream output)
output
- Output Streampublic StreamProgressListener(OutputStream output, boolean closeOnFinish)
output
- Output StreamcloseOnFinish
- Whether the stream should be closed when the
finish(Runner, Options, boolean)
event is receivedpublic void setForceThreadedOutput(boolean force)
force
- True if thread disambiguated output should be forced
regardless of the parallel threads declared by the
Options
protected OutputStream openStream()
public <T extends Options> void progress(Runner<T> runner, T options, String message)
ProgressListener
progress
in interface ProgressListener
runner
- Runneroptions
- Optionsmessage
- Messageprotected final boolean hasSwitchedThreads()
protected void updateThread()
public <T extends Options> void beforeOperation(Runner<T> runner, T options, Operation operation)
ProgressListener
beforeOperation
in interface ProgressListener
runner
- Runneroptions
- Optionsoperation
- Operationpublic <T extends Options> void afterOperation(Runner<T> runner, T options, Operation operation, OperationRun run)
ProgressListener
afterOperation
in interface ProgressListener
runner
- Runneroptions
- Optionsoperation
- Operationrun
- Run informationpublic <T extends Options> void beforeOperationMix(Runner<T> runner, T options, OperationMix mix)
ProgressListener
beforeOperationMix
in interface ProgressListener
runner
- Runneroptions
- Optionsmix
- Operation Mixpublic <T extends Options> void afterOperationMix(Runner<T> runner, T options, OperationMix mix, OperationMixRun run)
ProgressListener
afterOperationMix
in interface ProgressListener
runner
- Runneroptions
- Optionsmix
- Operation mixrun
- Mix run informationpublic <T extends Options> void start(Runner<T> runner, T options)
ProgressListener
start
in interface ProgressListener
runner
- Runneroptions
- Optionspublic <T extends Options> void finish(Runner<T> runner, T options, boolean ok)
ProgressListener
finish
in interface ProgressListener
runner
- Runneroptions
- Optionsok
- Indicates whether running finished normally, if false then
some error condition caused running to be haltedCopyright © 2014. All Rights Reserved.