Class Benchmark<T extends alluxio.stress.TaskResult>

    • Field Detail

      • mBaseParameters

        protected alluxio.stress.BaseParameters mBaseParameters
    • Constructor Detail

      • Benchmark

        public Benchmark()
    • Method Detail

      • getBenchDescription

        public abstract java.lang.String getBenchDescription()
        Get the description of the bench.
        Returns:
        string of the bench description
      • runLocal

        public abstract T runLocal()
                            throws java.lang.Exception
        Runs the test locally, in process.
        Returns:
        the task result
        Throws:
        java.lang.Exception
      • prepare

        public abstract void prepare()
                              throws java.lang.Exception
        Prepares to run the test.
        Throws:
        java.lang.Exception
      • cleanup

        public void cleanup()
                     throws java.lang.Exception
        Perform post-run cleanups.
        Throws:
        java.lang.Exception
      • mainInternal

        protected static void mainInternal​(java.lang.String[] args,
                                           Benchmark benchmark)
      • generateJobConfig

        public alluxio.job.plan.PlanConfig generateJobConfig​(java.lang.String[] args)
        Generate a StressBenchConfig as the default JobConfig.
        Parameters:
        args - arguments
        Returns:
        the JobConfig
      • run

        public java.lang.String run​(java.lang.String[] args)
                             throws java.lang.Exception
        Runs the test and returns the string output.
        Parameters:
        args - the command-line args
        Returns:
        the string result output
        Throws:
        java.lang.Exception
      • parseParameters

        protected void parseParameters​(java.lang.String[] args)
      • runSingleTask

        protected java.lang.String runSingleTask​(java.lang.String[] args)
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • processMethodProfiles

        protected java.util.Map<java.lang.String,​Benchmark.MethodStatistics> processMethodProfiles​(long startMs,
                                                                                                         long endMs,
                                                                                                         java.util.function.Function<Benchmark.ProfileInput,​java.lang.String> nameTransformer)
                                                                                                  throws java.io.IOException
        Parameters:
        startMs - the start time
        endMs - the end time
        nameTransformer - function which transforms the type and method into a name. If the function returns null, then the method is skipped
        Returns:
        a map of names to statistics
        Throws:
        java.io.IOException