public class CsvProgressListener extends Object implements ProgressListener
Constructor and Description |
---|
CsvProgressListener(String file)
Creates a new CSV progress listener which writes to the given file
provided it does not already exist
|
CsvProgressListener(String file,
boolean allowOverwrite)
Creates a new CSV progress listener which writes to the given file
optionally overwriting it if it exists
|
Modifier and Type | Method and Description |
---|---|
<T extends Options> |
afterOperation(Runner<T> runner,
T options,
Operation operation,
OperationRun run)
Does nothing as this listener discards individual operation run
statistics
|
<T extends Options> |
afterOperationMix(Runner<T> runner,
T options,
OperationMix mix,
OperationMixRun run)
Handles the Mix progress event by recording the run statistics for later
printing to the CSV file
|
<T extends Options> |
beforeOperation(Runner<T> runner,
T options,
Operation operation)
Does nothing as this listener discards individual operation run
statistics
|
<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)
Handles the finished event by printing relevant statistics to the CSV
file
|
<T extends Options> |
progress(Runner<T> runner,
T options,
String message)
Does nothing as this listener discards informational messages
|
<T extends Options> |
start(Runner<T> runner,
T options)
Handles the started event by preparing a record of the run configuration
which will eventually be printed to the CSV file
|
public CsvProgressListener(String file)
file
- Filepublic CsvProgressListener(String file, boolean allowOverwrite)
file
- FileallowOverwrite
- Whether to allow overwritespublic <T extends Options> void start(Runner<T> runner, T options)
start
in interface ProgressListener
runner
- Runneroptions
- Optionspublic <T extends Options> void finish(Runner<T> runner, T options, boolean ok)
finish
in interface ProgressListener
ok
- Whether benchmarking finished OKrunner
- Runneroptions
- Optionspublic <T extends Options> void progress(Runner<T> runner, T options, String message)
progress
in interface ProgressListener
message
- Informational Messagerunner
- Runneroptions
- Optionspublic <T extends Options> void beforeOperation(Runner<T> runner, T options, Operation operation)
beforeOperation
in interface ProgressListener
operation
- Benchmark Operationrunner
- Runneroptions
- Optionspublic <T extends Options> void afterOperation(Runner<T> runner, T options, Operation operation, OperationRun run)
afterOperation
in interface ProgressListener
operation
- Benchmark Operationrun
- Operation Run statisticsrunner
- Runneroptions
- Optionspublic <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)
afterOperationMix
in interface ProgressListener
runner
- Runneroptions
- Optionsmix
- Operation mixrun
- Mix run informationCopyright © 2016. All rights reserved.