Package org.apache.solr.bench
Class MiniClusterState.MiniClusterBenchState
- java.lang.Object
-
- org.apache.solr.bench.MiniClusterState.MiniClusterBenchState
-
- Enclosing class:
- MiniClusterState
public static class MiniClusterState.MiniClusterBenchState extends Object
The type Mini cluster bench state.
-
-
Constructor Summary
Constructors Constructor Description MiniClusterBenchState()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkWarmUp(org.openjdk.jmh.infra.Control control)
Check warm up.void
createCollection(String collection, int numShards, int numReplicas)
Create collection.void
doSetup(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams, BaseBenchState baseBenchState)
Do setup.void
dumpCoreInfo()
Dump core info.void
forceMerge(String collection, int maxMergeSegments)
Force merge.SplittableRandom
getRandom()
Gets random.void
index(String collection, Docs docs, int docCount)
void
index(String collection, Docs docs, int docCount, boolean parallel)
Index.void
metricsEnabled(boolean metricsEnabled)
Metrics enabled.void
setUseHttp1(boolean useHttp1)
Setting useHttp1 to true will make theclient
use http1void
shutdownMiniCluster(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams, BaseBenchState baseBenchState)
Shutdown mini cluster.void
startMiniCluster(int nodeCount)
Start mini cluster.void
tearDown(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams)
Tear down.void
waitForMerges(String collection)
Wait for merges.
-
-
-
Method Detail
-
tearDown
public void tearDown(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams) throws Exception
Tear down.- Parameters:
benchmarkParams
- the benchmark params- Throws:
Exception
- the exception
-
checkWarmUp
public void checkWarmUp(org.openjdk.jmh.infra.Control control) throws Exception
Check warm up.- Parameters:
control
- the control- Throws:
Exception
- the exception
-
shutdownMiniCluster
public void shutdownMiniCluster(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams, BaseBenchState baseBenchState) throws Exception
Shutdown mini cluster.- Parameters:
benchmarkParams
- the benchmark params- Throws:
Exception
- the exception
-
doSetup
public void doSetup(org.openjdk.jmh.infra.BenchmarkParams benchmarkParams, BaseBenchState baseBenchState) throws Exception
Do setup.- Parameters:
benchmarkParams
- the benchmark paramsbaseBenchState
- the base bench state- Throws:
Exception
- the exception
-
metricsEnabled
public void metricsEnabled(boolean metricsEnabled)
Metrics enabled.- Parameters:
metricsEnabled
- the metrics enabled
-
startMiniCluster
public void startMiniCluster(int nodeCount)
Start mini cluster.- Parameters:
nodeCount
- the node count
-
getRandom
public SplittableRandom getRandom()
Gets random.- Returns:
- the random
-
createCollection
public void createCollection(String collection, int numShards, int numReplicas) throws Exception
Create collection.- Parameters:
collection
- the collectionnumShards
- the num shardsnumReplicas
- the num replicas- Throws:
Exception
- the exception
-
setUseHttp1
public void setUseHttp1(boolean useHttp1)
Setting useHttp1 to true will make theclient
use http1
-
index
public void index(String collection, Docs docs, int docCount) throws Exception
- Throws:
Exception
-
index
public void index(String collection, Docs docs, int docCount, boolean parallel) throws Exception
Index.- Parameters:
collection
- the collectiondocs
- the docsdocCount
- the doc count- Throws:
Exception
- the exception
-
waitForMerges
public void waitForMerges(String collection) throws Exception
Wait for merges.- Parameters:
collection
- the collection- Throws:
Exception
- the exception
-
forceMerge
public void forceMerge(String collection, int maxMergeSegments) throws Exception
Force merge.- Parameters:
collection
- the collectionmaxMergeSegments
- the max merge segments- Throws:
Exception
- the exception
-
dumpCoreInfo
public void dumpCoreInfo() throws IOException
Dump core info.- Throws:
IOException
- the io exception
-
-