Package org.openjdk.jmh.infra
Class IterationParams
java.lang.Object
org.openjdk.jmh.infra.IterationParams
- All Implemented Interfaces:
Serializable
Iteration parameters.
Iteration parameters are separated in at least two instances, with different IterationType-s.
The complete benchmark parameters not specific for a particular iteration are available in
BenchmarkParams.
This class is dual-purpose:
- It acts as the interface between host JVM and forked JVM, so that the latter would not have to figure out the benchmark configuration again
- It can be injected into benchmark methods to access the runtime configuration info about the benchmark
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIterationParams(IterationType type, int count, TimeValue time, int batchSize) -
Method Summary
-
Field Details
-
type
iteration type -
count
protected final int countamount of iterations -
timeValue
iteration runtime -
batchSize
protected final int batchSizebatch size (method invocations inside the single op)
-
-
Constructor Details
-
IterationParams
-
-
Method Details
-
getType
Iteration type: separates warmup iterations vs. measurement iterations.- Returns:
- iteration type.
-
getCount
public int getCount()Number of iterations.- Returns:
- number of iterations of given type.
-
getTime
Time for iteration.- Returns:
- time
-
getBatchSize
public int getBatchSize()Batch size for iteration.- Returns:
- batch size
-
equals
-
hashCode
public int hashCode() -
toString
-