Class MiniClusterState.MiniClusterBenchState

  • Enclosing class:
    MiniClusterState

    public static class MiniClusterState.MiniClusterBenchState
    extends Object
    The type Mini cluster bench state.
    • Constructor Detail

      • MiniClusterBenchState

        public MiniClusterBenchState()
    • 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 params
        baseBenchState - 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 collection
        numShards - the num shards
        numReplicas - the num replicas
        Throws:
        Exception - the exception
      • index

        public void index​(String collection,
                          Docs docs,
                          int docCount)
                   throws Exception
        Index.
        Parameters:
        collection - the collection
        docs - the docs
        docCount - 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 collection
        maxMergeSegments - the max merge segments
        Throws:
        Exception - the exception
      • dumpCoreInfo

        public void dumpCoreInfo()
                          throws IOException
        Dump core info.
        Throws:
        IOException - the io exception