Package alluxio.stress.cli
Class RpcBench<T extends alluxio.stress.rpc.RpcBenchParameters>
- java.lang.Object
-
- alluxio.stress.cli.Benchmark<alluxio.stress.rpc.RpcTaskResult>
-
- alluxio.stress.cli.RpcBench<T>
-
- Type Parameters:
T- the childRpcBenchParameterstype
- Direct Known Subclasses:
GetPinnedFileIdsBench,RegisterWorkerBench,StreamRegisterWorkerBench,WorkerHeartbeatBench
public abstract class RpcBench<T extends alluxio.stress.rpc.RpcBenchParameters> extends Benchmark<alluxio.stress.rpc.RpcTaskResult>
A benchmarking tool to simulate stress on RPCs.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class alluxio.stress.cli.Benchmark
Benchmark.MethodStatistics, Benchmark.ProfileInput
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.concurrent.ExecutorServicemPool-
Fields inherited from class alluxio.stress.cli.Benchmark
mBaseParameters
-
-
Constructor Summary
Constructors Constructor Description RpcBench()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcleanup()Perform post-run cleanups.abstract TgetParameters()Returns the parameters.java.util.concurrent.ExecutorServicegetPool()If the thread pool is not yet initialized, creates the pool.alluxio.stress.rpc.RpcTaskResultrunLocal()Runs the test locally, in process.abstract alluxio.stress.rpc.RpcTaskResultrunRPC()Defines how each thread runs RPCs.-
Methods inherited from class alluxio.stress.cli.Benchmark
generateJobConfig, getBenchDescription, mainInternal, parseParameters, prepare, processMethodProfiles, run, runSingleTask
-
-
-
-
Method Detail
-
runRPC
public abstract alluxio.stress.rpc.RpcTaskResult runRPC() throws java.lang.ExceptionDefines how each thread runs RPCs.- Returns:
- the results of RPC runs
- Throws:
java.lang.Exception
-
getParameters
public abstract T getParameters()
Returns the parameters.- Returns:
- the parameters for the benchmark class
-
getPool
public java.util.concurrent.ExecutorService getPool()
If the thread pool is not yet initialized, creates the pool.- Returns:
- the thread pool
-
cleanup
public void cleanup() throws java.lang.ExceptionDescription copied from class:BenchmarkPerform post-run cleanups.
-
-