T
- the type of task resultpublic abstract class Benchmark<T extends TaskResult> extends Object
Modifier and Type | Class and Description |
---|---|
protected static class |
Benchmark.MethodStatistics |
protected static class |
Benchmark.ProfileInput |
Modifier and Type | Field and Description |
---|---|
protected BaseParameters |
mBaseParameters |
Constructor and Description |
---|
Benchmark() |
Modifier and Type | Method and Description |
---|---|
void |
cleanup()
Perform post-run cleanups.
|
PlanConfig |
generateJobConfig(String[] args)
Generate a
StressBenchConfig as the default JobConfig. |
abstract String |
getBenchDescription()
Get the description of the bench.
|
protected static void |
mainInternal(String[] args,
Benchmark benchmark) |
abstract void |
prepare()
Prepares to run the test.
|
protected Map<String,Benchmark.MethodStatistics> |
processMethodProfiles(long startMs,
long endMs,
java.util.function.Function<Benchmark.ProfileInput,String> nameTransformer) |
String |
run(String[] args)
Runs the test and returns the string output.
|
abstract T |
runLocal()
Runs the test locally, in process.
|
protected BaseParameters mBaseParameters
public abstract String getBenchDescription()
public abstract T runLocal() throws Exception
Exception
public PlanConfig generateJobConfig(String[] args)
StressBenchConfig
as the default JobConfig.args
- argumentspublic String run(String[] args) throws Exception
args
- the command-line argsException
protected Map<String,Benchmark.MethodStatistics> processMethodProfiles(long startMs, long endMs, java.util.function.Function<Benchmark.ProfileInput,String> nameTransformer) throws IOException
startMs
- the start timeendMs
- the end timenameTransformer
- function which transforms the type and method into a name. If the
function returns null, then the method is skippedIOException
Copyright © 2023. All Rights Reserved.