public interface Options
Modifier and Type | Field and Description |
---|---|
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
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(ProgressListener listener)
Adds a Progress Listener if it is not already registered
|
<T extends Options> |
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
|
boolean |
getEnsureAbsoluteURIs()
Gets whether the API should ensure that relative URIs are presented as
absolute URIs to services the harness interacts with
|
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 |
setEnsureAbsoluteURIs(boolean ensureAbsolute)
Sets whether the API should ensure that relative URIs are presented as
absolute URIs to services the harness interacts with
|
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
|
static final HaltBehaviour DEFAULT_HALT_BEHAVIOUR
static final int DEFAULT_TIMEOUT
static final String DEFAULT_FORMAT_SELECT
SELECT
queriesstatic final String DEFAULT_FORMAT_ASK
ASK
queriesstatic final String DEFAULT_FORMAT_GRAPH
CONSTRUCT
and DESCRIBE
queries
and operations that retrieve RDF graphsstatic final int DEFAULT_MAX_DELAY
static final int DEFAULT_PARALLEL_THREADS
static final int DEFAULT_SANITY_CHECKS
static final long DEFAULT_LIMIT
void addListener(ProgressListener listener)
listener
- Progress Listener<T extends Options> T copy()
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.
boolean getAllowCompression()
HttpAuthenticator getAuthenticator()
String getCustomEndpoint(String name)
name
- Endpoint nameMap<String,String> getCustomEndpoints()
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.
Map<String,Object> getCustomSettings()
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.
Dataset getDataset()
ExecutorService getExecutor()
long getGlobalOrder()
Called elsewhere so that mix runs and operation runs record what order they were run in
String getGraphStoreEndpoint()
boolean getHaltAny()
HaltBehaviour getHaltBehaviour()
boolean getHaltOnError()
boolean getHaltOnTimeout()
long getLimit()
List<ProgressListener> getListeners()
boolean getEnsureAbsoluteURIs()
int getMaxDelay()
OperationMixRunner getMixRunner()
null
is returned then
the default DefaultOperationMixRunner
should be usedboolean getNoCount()
OperationMix getOperationMix()
OperationRunner getOperationRunner()
null
is returned then the
default OperationRunner
should be usedint getParallelThreads()
String getQueryEndpoint()
boolean getRandomizeOrder()
String getResultsAskFormat()
String getResultsGraphFormat()
String getResultsSelectFormat()
int getSanityCheckLevel()
OperationMix getSetupMix()
null
indicates no setup mix is
requested.
Operations in a setup mix are guaranteed to be run exactly in the order given. >
OperationMix getTeardownMix()
null
indicates no tear down mix
is requested.
Operations in a tear down mix are guaranteed to be run exactly in the order given.
int getTimeout()
String getUpdateEndpoint()
void removeListener(ProgressListener listener)
listener
- Progress Listenervoid resetGlobalOrder()
Useful for runners that incorporate warmups into their runs
void setAllowCompression(boolean allowed)
allowed
- Whether Deflate/GZip compression is allowedvoid setAuthenticator(HttpAuthenticator authenticator)
authenticator
- HTTP authenticatorvoid setCustomEndpoint(String name, String endpoint)
name
- Nameendpoint
- Endpoint URIvoid setDataset(Dataset dataset)
dataset
- Datasetvoid setEnsureAbsoluteURIs(boolean ensureAbsolute)
void setGraphStoreEndpoint(String endpoint)
endpoint
- void setHaltAny(boolean halt)
halt
- Whether any issue should cause benchmarking to abortvoid setHaltBehaviour(HaltBehaviour behaviour)
behaviour
- Halting Behaviourvoid setHaltOnError(boolean halt)
halt
- Whether an error should cause benchmarking to abortvoid setHaltOnTimeout(boolean halt)
halt
- Whether a timeout should cause benchmarking to abortvoid setLimit(long limit)
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
limit
- Limit to imposevoid setMaxDelay(int milliseconds)
milliseconds
- Maximum Delay in millisecondsvoid setMixRunner(OperationMixRunner runner)
null
then the
default DefaultOperationMixRunner
should be usedrunner
- Operation mix runnervoid setNoCount(boolean noCount)
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
noCount
- Whether query results are countedvoid setOperationMix(OperationMix queries)
queries
- Query Mixvoid setOperationRunner(OperationRunner runner)
null
then the default
DefaultOperationRunner
should be usedrunner
- Operation runnervoid setParallelThreads(int threads)
threads
- Number of Parallel Threadsvoid setQueryEndpoint(String endpoint)
endpoint
- SPARQL query endpoint URIvoid setRandomizeOrder(boolean randomize)
randomize
- Whether operation order should be randomvoid setResultsAskFormat(String contentType)
contentType
- MIME Type for ASK resultsvoid setResultsGraphFormat(String contentType)
contentType
- MIME Type for CONSTRUCT/DESCRIBE results and RDF graphsvoid setResultsSelectFormat(String contentType)
contentType
- MIME Type for SELECT resultsvoid setSanityCheckLevel(int level)
level
- Sanity Check Levelvoid setSetupMix(OperationMix mix)
Operations in a setup mix are guaranteed to be run exactly in the order given. >
mix
- Setup mixvoid setTeardownMix(OperationMix mix)
Operations in a tear down mix are guaranteed to be run exactly in the order given.
mix
- Tear down mixvoid setTimeout(int timeout)
timeout
- Timeout in secondsvoid setUpdateEndpoint(String endpoint)
endpoint
- SPARQL update endpoint URICopyright © 2015. All rights reserved.