net.sf.sparql.benchmarking.monitoring
Class XmlProgressListener

java.lang.Object
  extended by net.sf.sparql.benchmarking.monitoring.XmlProgressListener
All Implemented Interfaces:
ProgressListener

public class XmlProgressListener
extends Object
implements ProgressListener

A Progress Listener that generates a XML output file

Author:
rvesse

Field Summary
static String ATTR_ACTUAL_AVG_RUNTIME
          Constants for Tag and Attribute Names
static String ATTR_ACTUAL_OMPH
          Constants for Tag and Attribute Names
static String ATTR_ACTUAL_OPH
          Constants for Tag and Attribute Names
static String ATTR_ACTUAL_OPS
          Constants for Tag and Attribute Names
static String ATTR_ACTUAL_RUNTIME
          Constants for Tag and Attribute Names
static String ATTR_ASK_FORMAT
          Constants for Tag and Attribute Names
static String ATTR_AVG_RESPONSE_TIME
          Constants for Tag and Attribute Names
static String ATTR_AVG_RESPONSE_TIME_GEOM
          Constants for Tag and Attribute Names
static String ATTR_AVG_RUNTIME
          Constants for Tag and Attribute Names
static String ATTR_AVG_RUNTIME_GEOM
          Constants for Tag and Attribute Names
static String ATTR_COMPRESSION
          Constants for Tag and Attribute Names
static String ATTR_COUNTING
          Constants for Tag and Attribute Names
static String ATTR_FASTEST_OPERATION
          Constants for Tag and Attribute Names
static String ATTR_GRAPH_FORMAT
          Constants for Tag and Attribute Names
static String ATTR_ID
          Constants for Tag and Attribute Names
static String ATTR_LIMIT
          Constants for Tag and Attribute Names
static String ATTR_MAX_DELAY
          Constants for Tag and Attribute Names
static String ATTR_MAX_MIX_RUNTIME
          Constants for Tag and Attribute Names
static String ATTR_MAX_OPERATION_RUNTIME
          Constants for Tag and Attribute Names
static String ATTR_MIN_MIX_RUNTIME
          Constants for Tag and Attribute Names
static String ATTR_MIN_OPERATION_RUNTIME
          Constants for Tag and Attribute Names
static String ATTR_NAME
          Constants for Tag and Attribute Names
static String ATTR_OMPH
          Constants for Tag and Attribute Names
static String ATTR_OPH
          Constants for Tag and Attribute Names
static String ATTR_OPS
          Constants for Tag and Attribute Names
static String ATTR_OUTLIERS
          Constants for Tag and Attribute Names
static String ATTR_QUERY_ENDPOINT
          Constants for Tag and Attribute Names
static String ATTR_RANDOM_ORDER
          Constants for Tag and Attribute Names
static String ATTR_RESPONSE_TIME
          Constants for Tag and Attribute Names
static String ATTR_RESULT_COUNT
          Constants for Tag and Attribute Names
static String ATTR_RUN_ORDER
          Constants for Tag and Attribute Names
static String ATTR_RUNS
          Constants for Tag and Attribute Names
static String ATTR_RUNTIME
          Constants for Tag and Attribute Names
static String ATTR_SANITY_CHECKING
          Constants for Tag and Attribute Names
static String ATTR_SELECT_FORMAT
          Constants for Tag and Attribute Names
static String ATTR_SLOWEST_OPERATION
          Constants for Tag and Attribute Names
static String ATTR_STD_DEV
          Constants for Tag and Attribute Names
static String ATTR_THREADS
          Constants for Tag and Attribute Names
static String ATTR_TIMEOUT
          Constants for Tag and Attribute Names
static String ATTR_TOTAL_RESPONSE_TIME
          Constants for Tag and Attribute Names
static String ATTR_TOTAL_RUNTIME
          Constants for Tag and Attribute Names
static String ATTR_TYPE
          Constants for Tag and Attribute Names
static String ATTR_VALUE
          Constants for Tag and Attribute Names
static String ATTR_VARIANCE
          Constants for Tag and Attribute Names
static String ATTR_WARMUPS
          Constants for Tag and Attribute Names
static String TAG_CONFIG_PROPERTY
          Constants for Tag and Attribute Names
static String TAG_CONFIGURATION
          Constants for Tag and Attribute Names
static String TAG_MIX_RUN
          Constants for Tag and Attribute Names
static String TAG_MIX_RUNS
          Constants for Tag and Attribute Names
static String TAG_OPERATION
          Constants for Tag and Attribute Names
static String TAG_OPERATIONS
          Constants for Tag and Attribute Names
static String TAG_SPARQL_BENCHMARK
          Constants for Tag and Attribute Names
static String TAG_STATS
          Constants for Tag and Attribute Names
static String TAG_SUMMARY
          Constants for Tag and Attribute Names
 
Constructor Summary
XmlProgressListener(String outputPath)
          Creates a new XML progress listener which writes to the given path unless it already exists
XmlProgressListener(String outputPath, boolean allowOverwrite)
          Constructor to be called when the file to write to is known in advance of benchmarking
 
Method Summary
<T extends Options>
void
afterOperation(Runner<T> runner, T options, Operation operation, OperationRun run)
          Invoked after each run of an operation
<T extends Options>
void
afterOperationMix(Runner<T> runner, T options, OperationMix mix, OperationMixRun run)
          Invoked after each run of an operation mix
<T extends Options>
void
beforeOperation(Runner<T> runner, T options, Operation operation)
          Does nothing as this listener discards individual operation run statistics
<T extends Options>
void
beforeOperationMix(Runner<T> runner, T options, OperationMix mix)
          Invoked before each run of an operation mix
<T extends Options>
void
finish(Runner<T> runner, T options, boolean ok)
          Handles the finished event by printing statistics to the XML file
protected  void printProperty(String name, boolean value)
           
protected  void printProperty(String name, int value)
           
protected  void printProperty(String name, long value)
           
protected  void printProperty(String name, String value)
           
<T extends Options>
void
progress(Runner<T> runner, T options, String message)
          Invoked when an informational progress message is available
<T extends Options>
void
start(Runner<T> runner, T options)
          Handles the started event by printing run configuration to the XML file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TAG_SPARQL_BENCHMARK

public static final String TAG_SPARQL_BENCHMARK
Constants for Tag and Attribute Names

See Also:
Constant Field Values

TAG_CONFIGURATION

public static final String TAG_CONFIGURATION
Constants for Tag and Attribute Names

See Also:
Constant Field Values

TAG_CONFIG_PROPERTY

public static final String TAG_CONFIG_PROPERTY
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_ID

public static final String ATTR_ID
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_NAME

public static final String ATTR_NAME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_VALUE

public static final String ATTR_VALUE
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_TYPE

public static final String ATTR_TYPE
Constants for Tag and Attribute Names

See Also:
Constant Field Values

TAG_OPERATIONS

public static final String TAG_OPERATIONS
Constants for Tag and Attribute Names

See Also:
Constant Field Values

TAG_OPERATION

public static final String TAG_OPERATION
Constants for Tag and Attribute Names

See Also:
Constant Field Values

TAG_MIX_RUNS

public static final String TAG_MIX_RUNS
Constants for Tag and Attribute Names

See Also:
Constant Field Values

TAG_MIX_RUN

public static final String TAG_MIX_RUN
Constants for Tag and Attribute Names

See Also:
Constant Field Values

TAG_STATS

public static final String TAG_STATS
Constants for Tag and Attribute Names

See Also:
Constant Field Values

TAG_SUMMARY

public static final String TAG_SUMMARY
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_COMPRESSION

public static final String ATTR_COMPRESSION
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_LIMIT

public static final String ATTR_LIMIT
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_COUNTING

public static final String ATTR_COUNTING
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_THREADS

public static final String ATTR_THREADS
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_SELECT_FORMAT

public static final String ATTR_SELECT_FORMAT
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_GRAPH_FORMAT

public static final String ATTR_GRAPH_FORMAT
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_ASK_FORMAT

public static final String ATTR_ASK_FORMAT
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_MAX_DELAY

public static final String ATTR_MAX_DELAY
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_TIMEOUT

public static final String ATTR_TIMEOUT
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_OUTLIERS

public static final String ATTR_OUTLIERS
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_RANDOM_ORDER

public static final String ATTR_RANDOM_ORDER
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_RUNS

public static final String ATTR_RUNS
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_WARMUPS

public static final String ATTR_WARMUPS
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_SANITY_CHECKING

public static final String ATTR_SANITY_CHECKING
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_QUERY_ENDPOINT

public static final String ATTR_QUERY_ENDPOINT
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_RESPONSE_TIME

public static final String ATTR_RESPONSE_TIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_TOTAL_RESPONSE_TIME

public static final String ATTR_TOTAL_RESPONSE_TIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_RUNTIME

public static final String ATTR_RUNTIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_RESULT_COUNT

public static final String ATTR_RESULT_COUNT
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_TOTAL_RUNTIME

public static final String ATTR_TOTAL_RUNTIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_ACTUAL_RUNTIME

public static final String ATTR_ACTUAL_RUNTIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_ACTUAL_AVG_RUNTIME

public static final String ATTR_ACTUAL_AVG_RUNTIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_MIN_OPERATION_RUNTIME

public static final String ATTR_MIN_OPERATION_RUNTIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_MAX_OPERATION_RUNTIME

public static final String ATTR_MAX_OPERATION_RUNTIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_MIN_MIX_RUNTIME

public static final String ATTR_MIN_MIX_RUNTIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_MAX_MIX_RUNTIME

public static final String ATTR_MAX_MIX_RUNTIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_AVG_RUNTIME

public static final String ATTR_AVG_RUNTIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_AVG_RUNTIME_GEOM

public static final String ATTR_AVG_RUNTIME_GEOM
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_AVG_RESPONSE_TIME

public static final String ATTR_AVG_RESPONSE_TIME
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_AVG_RESPONSE_TIME_GEOM

public static final String ATTR_AVG_RESPONSE_TIME_GEOM
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_VARIANCE

public static final String ATTR_VARIANCE
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_STD_DEV

public static final String ATTR_STD_DEV
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_OPS

public static final String ATTR_OPS
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_ACTUAL_OPS

public static final String ATTR_ACTUAL_OPS
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_OPH

public static final String ATTR_OPH
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_ACTUAL_OPH

public static final String ATTR_ACTUAL_OPH
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_OMPH

public static final String ATTR_OMPH
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_ACTUAL_OMPH

public static final String ATTR_ACTUAL_OMPH
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_FASTEST_OPERATION

public static final String ATTR_FASTEST_OPERATION
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_SLOWEST_OPERATION

public static final String ATTR_SLOWEST_OPERATION
Constants for Tag and Attribute Names

See Also:
Constant Field Values

ATTR_RUN_ORDER

public static final String ATTR_RUN_ORDER
Constants for Tag and Attribute Names

See Also:
Constant Field Values
Constructor Detail

XmlProgressListener

public XmlProgressListener(String outputPath)
Creates a new XML progress listener which writes to the given path unless it already exists

Parameters:
outputPath - Output File Path

XmlProgressListener

public XmlProgressListener(String outputPath,
                           boolean allowOverwrite)
Constructor to be called when the file to write to is known in advance of benchmarking

Parameters:
outputPath - Output File Path
allowOverwrite - Whether overwriting an existing file is permitted
Method Detail

start

public <T extends Options> void start(Runner<T> runner,
                                      T options)
Handles the started event by printing run configuration to the XML file

Specified by:
start in interface ProgressListener
Parameters:
runner - Runner
options - Options

printProperty

protected void printProperty(String name,
                             int value)

printProperty

protected void printProperty(String name,
                             long value)

printProperty

protected void printProperty(String name,
                             boolean value)

printProperty

protected void printProperty(String name,
                             String value)

finish

public <T extends Options> void finish(Runner<T> runner,
                                       T options,
                                       boolean ok)
Handles the finished event by printing statistics to the XML file

Specified by:
finish in interface ProgressListener
Parameters:
ok - Whether benchmarking finished OK
runner - Runner
options - Options

progress

public <T extends Options> void progress(Runner<T> runner,
                                         T options,
                                         String message)
Description copied from interface: ProgressListener
Invoked when an informational progress message is available

Specified by:
progress in interface ProgressListener
Parameters:
runner - Runner
options - Options
message - Message

beforeOperation

public <T extends Options> void beforeOperation(Runner<T> runner,
                                                T options,
                                                Operation operation)
Does nothing as this listener discards individual operation run statistics

Specified by:
beforeOperation in interface ProgressListener
Parameters:
operation - Benchmark Operation
runner - Runner
options - Options

afterOperation

public <T extends Options> void afterOperation(Runner<T> runner,
                                               T options,
                                               Operation operation,
                                               OperationRun run)
Description copied from interface: ProgressListener
Invoked after each run of an operation

Specified by:
afterOperation in interface ProgressListener
Parameters:
runner - Runner
options - Options
operation - Operation
run - Run information

beforeOperationMix

public <T extends Options> void beforeOperationMix(Runner<T> runner,
                                                   T options,
                                                   OperationMix mix)
Description copied from interface: ProgressListener
Invoked before each run of an operation mix

Specified by:
beforeOperationMix in interface ProgressListener
Parameters:
runner - Runner
options - Options
mix - Operation Mix

afterOperationMix

public <T extends Options> void afterOperationMix(Runner<T> runner,
                                                  T options,
                                                  OperationMix mix,
                                                  OperationMixRun run)
Description copied from interface: ProgressListener
Invoked after each run of an operation mix

Specified by:
afterOperationMix in interface ProgressListener
Parameters:
runner - Runner
options - Options
mix - Operation mix
run - Mix run information


Copyright © 2014. All Rights Reserved.