net.sf.sparql.benchmarking.options
Interface Options

All Known Implementing Classes:
BenchmarkOptions, OptionsImpl, SoakOptions, StressOptions

public interface Options

Interface for generic runner options

Author:
rvesse

Field Summary
static String DEFAULT_FORMAT_ASK
          Default Result Format for ASK queries
static String DEFAULT_FORMAT_GRAPH
          Default Result Format for CONSTRUCT and DESCRIBE queries and operations that retrieve RDF graphs
static String DEFAULT_FORMAT_SELECT
          Default Result Format for SELECT queries
static HaltBehaviour DEFAULT_HALT_BEHAVIOUR
          Default Halting Behaviour
static long DEFAULT_LIMIT
          Default Limit, values <= 0 are considered to mean leave existing LIMIT as-is and don't impose a limit on unlimited queries
static int DEFAULT_MAX_DELAY
          Default Max Delay between operations in milliseconds
static int DEFAULT_PARALLEL_THREADS
          Default Parallel Threads to use
static int DEFAULT_SANITY_CHECKS
          Default Sanity Checks
static int DEFAULT_TIMEOUT
          Default Timeout in Seconds
 
Method Summary
 void addListener(ProgressListener listener)
          Adds a Progress Listener if it is not already registered
<T extends Options>
T
copy()
          Makes a copy of the options
 boolean getAllowCompression()
          Gets whether the client will allow the server to return Deflate/GZip compressed responses
 HttpAuthenticator getAuthenticator()
          Gets the HTTP authenticator in use
 String getCustomEndpoint(String name)
          Gets a custom endpoint
 Map<String,String> getCustomEndpoints()
          Gets an unmodifiable copy of the defined custom endpoints
 Map<String,Object> getCustomSettings()
          Gets a map that may be used to get/set custom settings
 Dataset getDataset()
          Gets a dataset that is used for in-memory queries and updates
 ExecutorService getExecutor()
          Gets the in-use executor for running queries and query mixes in threads using the Java concurrent framework
 long getGlobalOrder()
          Gets the Global Run Order
 String getGraphStoreEndpoint()
          Gets the SPARQL graph store protocol endpoint that is in use
 boolean getHaltAny()
          Gets Halt on Any behavior
 HaltBehaviour getHaltBehaviour()
          Gets the Halting Behaviour
 boolean getHaltOnError()
          Gets the Halt on Error behavior
 boolean getHaltOnTimeout()
          Gets the Halt on Timeout behavior
 long getLimit()
          Gets the LIMIT to impose on queries
 List<ProgressListener> getListeners()
          Gets the Progress Listeners registered
 int getMaxDelay()
          Gets the maximum delay between operations
 OperationMixRunner getMixRunner()
          Gets the operation mix runner to use, if null is returned then the default DefaultOperationMixRunner should be used
 boolean getNoCount()
          Gets whether query results are counted or just thrown away
 OperationMix getOperationMix()
          Gets the Query Mix that is used
 OperationRunner getOperationRunner()
          Gets the operation runner to use, if null is returned then the default OperationRunner should be used
 int getParallelThreads()
          Gets the number of parallel threads used for testing
 String getQueryEndpoint()
          Gets the SPARQL query endpoint that is in use
 boolean getRandomizeOrder()
          Gets whether operation order should be randomized
 String getResultsAskFormat()
          Gets the Results format used for operations that make ASK queries
 String getResultsGraphFormat()
          Gets the Results format used for operations that make CONSTRUCT/DESCRIBE queries or that retrieve RDF graphs
 String getResultsSelectFormat()
          Gets the Results format used for operations that make SELECT queries
 int getSanityCheckLevel()
          Gets the Sanity Checking Level
 OperationMix getSetupMix()
          Gets the setup mix to be run, null indicates no setup mix is requested.
 OperationMix getTeardownMix()
          Gets the tear down mix to be run, null indicates no tear down mix is requested.
 int getTimeout()
          Gets the timeout for operations, a zero/negative value indicates no timeout
 String getUpdateEndpoint()
          Gets the SPARQL Update endpoint that is in use
 void removeListener(ProgressListener listener)
          Removes a Progress Listener if it is registered
 void resetGlobalOrder()
          Resets the global run order
 void setAllowCompression(boolean allowed)
          Sets whether the client will allow the server to return Deflate/GZip compressed responses
 void setAuthenticator(HttpAuthenticator authenticator)
          Sets the HTTP authenticator used
 void setCustomEndpoint(String name, String endpoint)
          Sets a custom defined endpoint
 void setDataset(Dataset dataset)
          Sets a dataset to be used for in-memory queries and updates
 void setGraphStoreEndpoint(String endpoint)
          Gets the SPARQL graph store protocol endpoint that is in use
 void setHaltAny(boolean halt)
          Sets Halt on Any behavior, if set to true sets Halt on Error and Halt on Timeout to true as well
 void setHaltBehaviour(HaltBehaviour behaviour)
          Sets the Halting Behaviour
 void setHaltOnError(boolean halt)
          Sets the Halt on Error behavior
 void setHaltOnTimeout(boolean halt)
          Sets the Halt on Timeout behavior
 void setLimit(long limit)
          Sets the LIMIT to impose on queries
 void setMaxDelay(int milliseconds)
          Sets the maximum delay between operations
 void setMixRunner(OperationMixRunner runner)
          Sets the operation mix runner to use, if set to null then the default DefaultOperationMixRunner should be used
 void setNoCount(boolean noCount)
          Sets whether query results are counted or just thrown away
 void setOperationMix(OperationMix queries)
          Sets the Query Mix to use
 void setOperationRunner(OperationRunner runner)
          Sets the operation runner to use, if set to null then the default DefaultOperationRunner should be used
 void setParallelThreads(int threads)
          Sets the number of parallel threads used for testing
 void setQueryEndpoint(String endpoint)
          Sets the SPARQL query endpoint to be used
 void setRandomizeOrder(boolean randomize)
          Sets whether operation order should be randomized
 void setResultsAskFormat(String contentType)
          Sets the Results format to be used for operations that make ASK queries
 void setResultsGraphFormat(String contentType)
          Sets the Results format used for operations that CONSTRUCT/DESCRIBE queries or that retrieve RDF graphs
 void setResultsSelectFormat(String contentType)
          Sets the Results format to be used for operations that make SELECT queries
 void setSanityCheckLevel(int level)
          Sets the Sanity Checking level
 void setSetupMix(OperationMix mix)
          Sets the setup mix that will be run once before testing starts.
 void setTeardownMix(OperationMix mix)
          Sets the tear down mix that will be run once after testing completes successfully.
 void setTimeout(int timeout)
          Sets the timeout for operations, a zero/negative value indicates no timeout
 void setUpdateEndpoint(String endpoint)
          Sets the SPARQL update endpoint that is in use
 

Field Detail

DEFAULT_HALT_BEHAVIOUR

static final HaltBehaviour DEFAULT_HALT_BEHAVIOUR
Default Halting Behaviour


DEFAULT_TIMEOUT

static final int DEFAULT_TIMEOUT
Default Timeout in Seconds

See Also:
Constant Field Values

DEFAULT_FORMAT_SELECT

static final String DEFAULT_FORMAT_SELECT
Default Result Format for SELECT queries

See Also:
Constant Field Values

DEFAULT_FORMAT_ASK

static final String DEFAULT_FORMAT_ASK
Default Result Format for ASK queries

See Also:
Constant Field Values

DEFAULT_FORMAT_GRAPH

static final String DEFAULT_FORMAT_GRAPH
Default Result Format for CONSTRUCT and DESCRIBE queries and operations that retrieve RDF graphs

See Also:
Constant Field Values

DEFAULT_MAX_DELAY

static final int DEFAULT_MAX_DELAY
Default Max Delay between operations in milliseconds

See Also:
Constant Field Values

DEFAULT_PARALLEL_THREADS

static final int DEFAULT_PARALLEL_THREADS
Default Parallel Threads to use

See Also:
Constant Field Values

DEFAULT_SANITY_CHECKS

static final int DEFAULT_SANITY_CHECKS
Default Sanity Checks

See Also:
Constant Field Values

DEFAULT_LIMIT

static final long DEFAULT_LIMIT
Default Limit, values <= 0 are considered to mean leave existing LIMIT as-is and don't impose a limit on unlimited queries

See Also:
Constant Field Values
Method Detail

addListener

void addListener(ProgressListener listener)
Adds a Progress Listener if it is not already registered

Parameters:
listener - Progress Listener

copy

<T extends Options> T copy()
Makes a copy of the options

While this is guaranteed to take a copy of primitive typed properties there is no guarantee that it takes a copy of reference types so changing some properties will still affect the original options. This method is primarily intended for use in cases where you need to tweak an option without interfering with other consumers of the options which is particularly relevant when running multi-threaded testing.

Returns:
Copied options

getAllowCompression

boolean getAllowCompression()
Gets whether the client will allow the server to return Deflate/GZip compressed responses

Returns:
Whether Deflate/GZip compression is allowed

getAuthenticator

HttpAuthenticator getAuthenticator()
Gets the HTTP authenticator in use

Returns:
HTTP authenticator

getCustomEndpoint

String getCustomEndpoint(String name)
Gets a custom endpoint

Parameters:
name - Endpoint name
Returns:
Endpoint URI

getCustomEndpoints

Map<String,String> getCustomEndpoints()
Gets an unmodifiable copy of the defined custom endpoints

Custom endpoints are a more specific form of the getCustomSettings() and provide a slightly more user friendly and type safe interface when the custom setting to be defined has a string value.

Returns:
Map of custom endpoints

getCustomSettings

Map<String,Object> getCustomSettings()
Gets a map that may be used to get/set custom settings

This is provided so custom operations may be created that can share state or that need custom settings to be provided and can't modify/extend the standard Options interface since they want to run with existing standard runners.

Returns:
Map of custom settings

getDataset

Dataset getDataset()
Gets a dataset that is used for in-memory queries and updates

Returns:
Dataset

getExecutor

ExecutorService getExecutor()
Gets the in-use executor for running queries and query mixes in threads using the Java concurrent framework

Returns:
The Executor Service used to execute tasks

getGlobalOrder

long getGlobalOrder()
Gets the Global Run Order

Called elsewhere so that mix runs and operation runs record what order they were run in

Returns:
Global Run Order

getGraphStoreEndpoint

String getGraphStoreEndpoint()
Gets the SPARQL graph store protocol endpoint that is in use

Returns:
SPARQL graph store endpoint URI

getHaltAny

boolean getHaltAny()
Gets Halt on Any behavior

Returns:
Whether any issue causes benchmarking to abort

getHaltBehaviour

HaltBehaviour getHaltBehaviour()
Gets the Halting Behaviour

Returns:
Halting Behaviour

getHaltOnError

boolean getHaltOnError()
Gets the Halt on Error behavior

Returns:
Whether an error causes benchmarking to abort

getHaltOnTimeout

boolean getHaltOnTimeout()
Gets the Halt on Timeout behavior

Returns:
Whether a timeout causes benchmarking to abort

getLimit

long getLimit()
Gets the LIMIT to impose on queries

Returns:
Limit to impose

getListeners

List<ProgressListener> getListeners()
Gets the Progress Listeners registered

Returns:
Progress Listeners

getMaxDelay

int getMaxDelay()
Gets the maximum delay between operations

Returns:
Maximum Delay in milliseconds

getMixRunner

OperationMixRunner getMixRunner()
Gets the operation mix runner to use, if null is returned then the default DefaultOperationMixRunner should be used

Returns:
Operation mix runner

getNoCount

boolean getNoCount()
Gets whether query results are counted or just thrown away

Returns:
True if results will not be counted

getOperationMix

OperationMix getOperationMix()
Gets the Query Mix that is used

Returns:
Query Mix

getOperationRunner

OperationRunner getOperationRunner()
Gets the operation runner to use, if null is returned then the default OperationRunner should be used

Returns:
Operation runner

getParallelThreads

int getParallelThreads()
Gets the number of parallel threads used for testing

Returns:
Number of parallel threads

getQueryEndpoint

String getQueryEndpoint()
Gets the SPARQL query endpoint that is in use

Returns:
SPARQL query endpoint URI

getRandomizeOrder

boolean getRandomizeOrder()
Gets whether operation order should be randomized

Returns:
Whether operation order is random

getResultsAskFormat

String getResultsAskFormat()
Gets the Results format used for operations that make ASK queries

Returns:
MIME Type for ASK results

getResultsGraphFormat

String getResultsGraphFormat()
Gets the Results format used for operations that make CONSTRUCT/DESCRIBE queries or that retrieve RDF graphs

Returns:
MIME Type for CONSTRUCT/DESCRUBE results and RDF graphs

getResultsSelectFormat

String getResultsSelectFormat()
Gets the Results format used for operations that make SELECT queries

Returns:
MIME Type for SELECT results

getSanityCheckLevel

int getSanityCheckLevel()
Gets the Sanity Checking Level

Returns:
Sanity Check Level

getSetupMix

OperationMix getSetupMix()
Gets the setup mix to be run, null indicates no setup mix is requested.

Operations in a setup mix are guaranteed to be run exactly in the order given.

Returns:
Setup mix or null

getTeardownMix

OperationMix getTeardownMix()
Gets the tear down mix to be run, null indicates no tear down mix is requested.

Operations in a tear down mix are guaranteed to be run exactly in the order given.

Returns:
Tear down mix or null

getTimeout

int getTimeout()
Gets the timeout for operations, a zero/negative value indicates no timeout

Returns:
Timeout in seconds

getUpdateEndpoint

String getUpdateEndpoint()
Gets the SPARQL Update endpoint that is in use

Returns:
SPARQL update endpoint URI

removeListener

void removeListener(ProgressListener listener)
Removes a Progress Listener if it is registered

Parameters:
listener - Progress Listener

resetGlobalOrder

void resetGlobalOrder()
Resets the global run order

Useful for runners that incorporate warmups into their runs


setAllowCompression

void setAllowCompression(boolean allowed)
Sets whether the client will allow the server to return Deflate/GZip compressed responses

Parameters:
allowed - Whether Deflate/GZip compression is allowed

setAuthenticator

void setAuthenticator(HttpAuthenticator authenticator)
Sets the HTTP authenticator used

Parameters:
authenticator - HTTP authenticator

setCustomEndpoint

void setCustomEndpoint(String name,
                       String endpoint)
Sets a custom defined endpoint

Parameters:
name - Name
endpoint - Endpoint URI

setDataset

void setDataset(Dataset dataset)
Sets a dataset to be used for in-memory queries and updates

Parameters:
dataset - Dataset

setGraphStoreEndpoint

void setGraphStoreEndpoint(String endpoint)
Gets the SPARQL graph store protocol endpoint that is in use

Parameters:
endpoint -

setHaltAny

void setHaltAny(boolean halt)
Sets Halt on Any behavior, if set to true sets Halt on Error and Halt on Timeout to true as well

Parameters:
halt - Whether any issue should cause benchmarking to abort

setHaltBehaviour

void setHaltBehaviour(HaltBehaviour behaviour)
Sets the Halting Behaviour

Parameters:
behaviour - Halting Behaviour

setHaltOnError

void setHaltOnError(boolean halt)
Sets the Halt on Error behavior

Parameters:
halt - Whether an error should cause benchmarking to abort

setHaltOnTimeout

void setHaltOnTimeout(boolean halt)
Sets the Halt on Timeout behavior

Parameters:
halt - Whether a timeout should cause benchmarking to abort

setLimit

void setLimit(long limit)
Sets the LIMIT to impose on queries

Values less than or equal to zero mean existing limits are left unchanged, non-zero values will be imposed iff existing limit is greater than the set limit

Parameters:
limit - Limit to impose

setMaxDelay

void setMaxDelay(int milliseconds)
Sets the maximum delay between operations

Parameters:
milliseconds - Maximum Delay in milliseconds

setMixRunner

void setMixRunner(OperationMixRunner runner)
Sets the operation mix runner to use, if set to null then the default DefaultOperationMixRunner should be used

Parameters:
runner - Operation mix runner

setNoCount

void setNoCount(boolean noCount)
Sets whether query results are counted or just thrown away

Currently enabling this only applies to SELECT queries as only SELECT queries stream the results currently, future versions of this tool will also stream CONSTRUCT/DESCRIBE results but this is yet to be implemented

Parameters:
noCount - Whether query results are counted

setOperationMix

void setOperationMix(OperationMix queries)
Sets the Query Mix to use

Parameters:
queries - Query Mix

setOperationRunner

void setOperationRunner(OperationRunner runner)
Sets the operation runner to use, if set to null then the default DefaultOperationRunner should be used

Parameters:
runner - Operation runner

setParallelThreads

void setParallelThreads(int threads)
Sets the number of parallel threads used for testing

Parameters:
threads - Number of Parallel Threads

setQueryEndpoint

void setQueryEndpoint(String endpoint)
Sets the SPARQL query endpoint to be used

Parameters:
endpoint - SPARQL query endpoint URI

setRandomizeOrder

void setRandomizeOrder(boolean randomize)
Sets whether operation order should be randomized

Parameters:
randomize - Whether operation order should be random

setResultsAskFormat

void setResultsAskFormat(String contentType)
Sets the Results format to be used for operations that make ASK queries

Parameters:
contentType - MIME Type for ASK results

setResultsGraphFormat

void setResultsGraphFormat(String contentType)
Sets the Results format used for operations that CONSTRUCT/DESCRIBE queries or that retrieve RDF graphs

Parameters:
contentType - MIME Type for CONSTRUCT/DESCRIBE results and RDF graphs

setResultsSelectFormat

void setResultsSelectFormat(String contentType)
Sets the Results format to be used for operations that make SELECT queries

Parameters:
contentType - MIME Type for SELECT results

setSanityCheckLevel

void setSanityCheckLevel(int level)
Sets the Sanity Checking level

Parameters:
level - Sanity Check Level

setSetupMix

void setSetupMix(OperationMix mix)
Sets the setup mix that will be run once before testing starts.

Operations in a setup mix are guaranteed to be run exactly in the order given.

Parameters:
mix - Setup mix

setTeardownMix

void setTeardownMix(OperationMix mix)
Sets the tear down mix that will be run once after testing completes successfully.

Operations in a tear down mix are guaranteed to be run exactly in the order given.

Parameters:
mix - Tear down mix

setTimeout

void setTimeout(int timeout)
Sets the timeout for operations, a zero/negative value indicates no timeout

Parameters:
timeout - Timeout in seconds

setUpdateEndpoint

void setUpdateEndpoint(String endpoint)
Sets the SPARQL update endpoint that is in use

Parameters:
endpoint - SPARQL update endpoint URI


Copyright © 2014. All Rights Reserved.