|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.caliper.api.Benchmark
com.google.caliper.SimpleBenchmark
public abstract class SimpleBenchmark
A convenience class for implementing benchmarks in plain code. Implementing classes must have a no-arguments constructor.
Param
documentation to learn about parameters.
Method Summary | |
---|---|
double |
bytesToUnits(long bytes)
|
ConfiguredBenchmark |
createBenchmark(Map<String,String> parameterValues)
|
Map<String,Integer> |
getInstanceUnitNames()
|
Map<String,Integer> |
getMemoryUnitNames()
|
Map<String,Integer> |
getTimeUnitNames()
A mapping of units to their values. |
double |
instancesToUnits(long instances)
|
double |
nanosToUnits(double nanos)
Converts nanoseconds to the smallest unit defined in Benchmark.getTimeUnitNames() . |
Scenario |
normalizeScenario(Scenario scenario)
|
Set<String> |
parameterNames()
|
Set<String> |
parameterValues(String parameterName)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Set<String> parameterNames()
parameterNames
in interface Benchmark
public Set<String> parameterValues(String parameterName)
parameterValues
in interface Benchmark
public ConfiguredBenchmark createBenchmark(Map<String,String> parameterValues)
createBenchmark
in interface Benchmark
public Scenario normalizeScenario(Scenario scenario)
public Map<String,Integer> getTimeUnitNames()
Benchmark
getTimeUnitNames
in interface Benchmark
public double nanosToUnits(double nanos)
Benchmark
Benchmark.getTimeUnitNames()
.
nanosToUnits
in interface Benchmark
public Map<String,Integer> getInstanceUnitNames()
getInstanceUnitNames
in interface Benchmark
public double instancesToUnits(long instances)
instancesToUnits
in interface Benchmark
public Map<String,Integer> getMemoryUnitNames()
getMemoryUnitNames
in interface Benchmark
public double bytesToUnits(long bytes)
bytesToUnits
in interface Benchmark
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |