public class StressTestConcurrent extends AbstractEmbeddedFederationTestCase implements com.bigdata.testutil.ExperimentDriver.IComparisonTest
DataService
. A federation
consisting of a MetadataService
and a single DataService
is
started. A client is created, connects to the federation, and registers an
index the federation. A pool of threads is created for that client and
populated with a number of operations. The threads then write and read
concurrently using unisolated operations on the data services. This test can
be used to observe the throughput and queue depth of arising from a variety
of data service and client configurations.Modifier and Type | Class and Description |
---|---|
static class |
StressTestConcurrent.GenerateExperiment
Experiment generation utility class.
|
static class |
StressTestConcurrent.Task
Run an unisolated operation.
|
static interface |
StressTestConcurrent.TestOptions
Additional properties understood by this test.
|
TestCase2.MyProperties, TestCase2.RandomType
client, dataService0, dataService1, fed, metadataService
keyBuilder, log, r
_randomType
Constructor and Description |
---|
StressTestConcurrent() |
StressTestConcurrent(String arg0) |
Modifier and Type | Method and Description |
---|---|
com.bigdata.testutil.ExperimentDriver.Result |
doComparisonTest(Properties properties)
Setup and run a test.
|
com.bigdata.testutil.ExperimentDriver.Result |
doConcurrentClientTest(IBigdataClient<?> client,
int nclients,
long timeout,
int ntrials,
int keyLen,
int nops,
double insertRate,
int nindices,
boolean testCorrectness)
A stress test with a pool of concurrent clients.
|
Properties |
getProperties()
Reads in the configuration properties for the test from a
variety of resources and returns a properties hierarchy.
|
static void |
main(String[] args)
Runs a single instance of the test as configured in the code.
|
void |
setUpComparisonTest(Properties properties) |
void |
tearDownComparisonTest() |
void |
test_stressTest2()
Test of N concurrent operations.
|
assertEquals, assertEquals, assertEquals, assertIndexRegistered, awaitAsynchronousOverflow, getPartitionCount, setUp, tearDown
assertChildKeys, assertEntryCounts, assertKeys, assertKeys, assertKeys, assertSameAbstractNodeData, assertSameBTree, assertSameEntryIterator, assertSameEntryIterator, assertSameIterator, assertSameIterator, assertSameLeaf, assertSameLeafData, assertSameNode, assertSameNodeData, assertSameNodeOrLeaf, assertSameRaba, assertValues, assertValues, doEntryIteratorTest, doInsertKeySequenceTest, doInsertLookupRemoveStressTest, doInsertRandomKeySequenceTest, doInsertRandomKeySequenceTest, doInsertRandomSparseKeySequenceTest, doKnownKeySequenceTest, doRandomIndexOfTest, doRandomKeyInsertTest, doRandomLookupTest, doRemoveStructureStressTest, doSplitTest, doSplitWithDecreasingKeySequence, doSplitWithIncreasingKeySequence, doSplitWithRandomDenseKeySequence, getBTree, getBTree, getKeysAndValues, getRandomKeys, getRandomKeyValues, i2k, nextLong, useRawRecords
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEqualsWithinUlps, assertSameArray, assertSameArray, assertSameBigDecimal, assertSameBigDecimal, assertSameBigInteger, assertSameBigInteger, assertSameIterator, assertSameIterator, assertSameIteratorAnyOrder, assertSameIteratorAnyOrder, assertSameValue, assertSameValue, assertZeroUlps, assertZeroUlps, fail, getInnerCause, getNormalInt, getProjectBuildPath, getRandomObject, getRandomObject, getRandomOrder, getRandomString, getTestInputStream, getTestResource, getTestResource, getUlps, getUlps, isDEBUG, isDEBUG, isINFO, isINFO, isInnerCause, logProperties
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString
public StressTestConcurrent()
public StressTestConcurrent(String arg0)
arg0
- public Properties getProperties()
TestCase2
Properties
object, then the lower levels of the
hierarchy are recursively searched.The hierarchy is constructed from the following properties files in the following order. The first property file in this list corresponds to the top of the property hierarchy. The last property file in this list corresponds to the bottom of the property hierarchy. The property resources are:
getProperties
in class AbstractEmbeddedFederationTestCase
Properties
object that supplies bindings for
property names according to the described hierarchy among
property resources. The returned Properties
is NOT
cached.
TODO This does not handle the recursive truncation of the
class name to search for "test.properties" yet.public void setUpComparisonTest(Properties properties) throws Exception
setUpComparisonTest
in interface com.bigdata.testutil.ExperimentDriver.IComparisonTest
Exception
public void tearDownComparisonTest() throws Exception
tearDownComparisonTest
in interface com.bigdata.testutil.ExperimentDriver.IComparisonTest
Exception
public void test_stressTest2() throws Exception
Exception
public com.bigdata.testutil.ExperimentDriver.Result doConcurrentClientTest(IBigdataClient<?> client, int nclients, long timeout, int ntrials, int keyLen, int nops, double insertRate, int nindices, boolean testCorrectness) throws InterruptedException, IOException
client
- The client.timeout
- The #of seconds before the test will terminate (ignored if
testCorrectness := true since tasks MUST run to
completion in order for comparisons against ground truth to be
valid).nclients
- The #of concurrent clients.ntrials
- The #of batch (remote) operations to execute.keyLen
- The length of the random unsigned byte[] keys used in the
operations. The longer the keys the less likely it is that
there will be a write-write conflict (that concurrent txs will
write on the same key).nops
- The #of rows in each operation.insertRate
- The rate of insert operations (inserting nops tuples)
in [0.0:1.0]. The balance of the operations will remove
nops tuples.nindices
- The #of different indices to which the operation will be
applied. The tasks will be generated modulo nindices.
When nindices is greater than one, there is increased
likelihood of tasks running concurrently before the first
split. Regardless of the value of nindices, after a scale-out
index has been split the likelihood of concurrent writers goes
up significantly.testCorrectness
- When true
, ground truth will be maintained and
verified against the post-condition of the index(s) under
test. This option may be used to verify index partition
split/join/move semantics and the correctness of
ClientIndexView
views. All operations on a ground
truth index are serialized (all operations may be serialized
if the ground truth indices are all backed by the same store)
so this option can not be used when you are doing performance
testing.InterruptedException
IOException
public static void main(String[] args) throws Exception
Exception
ExperimentDriver, which parameterizes the use of this stress test.
That information should be used to limit the #of transactions
allowed to start at one time on the server and should guide a search
for thinning down resource consumption, e.g., memory usage by
btrees, the node serializer, etc.
,
GenerateExperiment, which may be used to generate a set of
conditions to be run by the {@link ExperimentDriver}.
public com.bigdata.testutil.ExperimentDriver.Result doComparisonTest(Properties properties) throws Exception
doComparisonTest
in interface com.bigdata.testutil.ExperimentDriver.IComparisonTest
properties
- There are no "optional" properties - you must make sure that
each property has a defined value.Exception
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.