net.sf.sparql.benchmarking.options
Class StressOptions

java.lang.Object
  extended by net.sf.sparql.benchmarking.options.OptionsImpl
      extended by net.sf.sparql.benchmarking.options.StressOptions
All Implemented Interfaces:
Options

public class StressOptions
extends OptionsImpl

Options for stress testing

Author:
rvesse

Field Summary
static int DEFAULT_MAX_THREADS
          Default maximum number of threads for stress testing i.e.
static int DEFAULT_RAMP_UP_FACTOR
          Default stress test ramp up factor
static long DEFAULT_RUNTIME
          Default stress testing runtime threshold in minutes
 
Fields inherited from interface net.sf.sparql.benchmarking.options.Options
DEFAULT_FORMAT_ASK, DEFAULT_FORMAT_GRAPH, DEFAULT_FORMAT_SELECT, DEFAULT_HALT_BEHAVIOUR, DEFAULT_LIMIT, DEFAULT_MAX_DELAY, DEFAULT_PARALLEL_THREADS, DEFAULT_SANITY_CHECKS, DEFAULT_TIMEOUT
 
Constructor Summary
StressOptions()
          Creates new stress options
 
Method Summary
<T extends Options>
T
copy()
          Makes a copy of the options
 long getMaxRuntime()
          Gets the maximum stress runtime in minutes
 int getMaxThreads()
          Gets the maximum number of threads for stress testing
 int getRampUpFactor()
          Gets the ramp up factor
 void setMaxRuntime(long runtime)
          Sets the maximum stress runtime in minutes
 void setMaxThreads(int threads)
          Sets the maximum number of threads for stress testing
 void setRampUpFactor(int rampUpFactor)
           
 
Methods inherited from class net.sf.sparql.benchmarking.options.OptionsImpl
addListener, copyStandardOptions, getAllowCompression, getAuthenticator, getCustomEndpoint, getCustomEndpoints, getCustomSettings, getDataset, getExecutor, getGlobalOrder, getGraphStoreEndpoint, getHaltAny, getHaltBehaviour, getHaltOnError, getHaltOnTimeout, getLimit, getListeners, getMaxDelay, getMixRunner, getNoCount, getOperationMix, getOperationRunner, getParallelThreads, getQueryEndpoint, getRandomizeOrder, getResultsAskFormat, getResultsGraphFormat, getResultsSelectFormat, getSanityCheckLevel, getSetupMix, getTeardownMix, getTimeout, getUpdateEndpoint, removeListener, resetGlobalOrder, setAllowCompression, setAuthenticator, setCustomEndpoint, setDataset, setGraphStoreEndpoint, setHaltAny, setHaltBehaviour, setHaltOnError, setHaltOnTimeout, setLimit, setMaxDelay, setMixRunner, setNoCount, setOperationMix, setOperationRunner, setParallelThreads, setQueryEndpoint, setRandomizeOrder, setResultsAskFormat, setResultsGraphFormat, setResultsSelectFormat, setSanityCheckLevel, setSetupMix, setTeardownMix, setTimeout, setUpdateEndpoint
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_THREADS

public static final int DEFAULT_MAX_THREADS
Default maximum number of threads for stress testing i.e. the maximum number of parallel clients

See Also:
Constant Field Values

DEFAULT_RUNTIME

public static final long DEFAULT_RUNTIME
Default stress testing runtime threshold in minutes

See Also:
Constant Field Values

DEFAULT_RAMP_UP_FACTOR

public static final int DEFAULT_RAMP_UP_FACTOR
Default stress test ramp up factor

See Also:
Constant Field Values
Constructor Detail

StressOptions

public StressOptions()
Creates new stress options

Method Detail

setMaxThreads

public void setMaxThreads(int threads)
Sets the maximum number of threads for stress testing

May be set to 0 or a negative value to indicate there is no maximum threads

Parameters:
threads - Maximum threads

getMaxThreads

public int getMaxThreads()
Gets the maximum number of threads for stress testing

A value <= 0 is considered to indicate that there is no maximum number of threads

Returns:
Maximum number of threads

getMaxRuntime

public long getMaxRuntime()
Gets the maximum stress runtime in minutes

Returns:
Stress runtime in minutes

setMaxRuntime

public void setMaxRuntime(long runtime)
Sets the maximum stress runtime in minutes

Parameters:
runtime - Soak runtime in minutes

getRampUpFactor

public int getRampUpFactor()
Gets the ramp up factor

Returns:
Ramp up factor

setRampUpFactor

public void setRampUpFactor(int rampUpFactor)

copy

public <T extends Options> T copy()
Description copied from interface: Options
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.

Specified by:
copy in interface Options
Overrides:
copy in class OptionsImpl
Returns:
Copied options


Copyright © 2014. All Rights Reserved.