Package org.apache.beam.sdk.jmh.schemas
Class GetterBasedSchemaProviderBenchmark
java.lang.Object
org.apache.beam.sdk.jmh.schemas.GetterBasedSchemaProviderBenchmark
Benchmarks for
GetterBasedSchemaProvider
on reading / writing fields based on toRowFunction
/ fromRowFunction
.
Each benchmark method invocation, depending on RowBundle.action
, either reads a single
field of a bundle of n
rows using the corresponding getter via
RowWithGetters.getValue(int)
or writes that field using the corresponding setter to a new
object instance.
Rows are created upfront and provided as JMH State
to exclude initialization costs
from the measurement.
- The score doesn't reflect read / write access only, measurement includes iterating over a large number of rows.
- All rows contain just a single field. Nevertheless it is tricky to compare scores between different benchmarks: nested structures are read recursively and collections / maps are iterated through.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
void
processBytesField
(RowBundles.BytesBundle state, Blackhole bh) void
void
processIntField
(RowBundles.IntBundle state, Blackhole bh) void
void
void
void
void
void
processStringField
(RowBundles.StringBundle state, Blackhole bh)
-
Constructor Details
-
GetterBasedSchemaProviderBenchmark
public GetterBasedSchemaProviderBenchmark()
-
-
Method Details
-
processIntField
-
processNestedIntField
-
processStringField
-
processStringBuilderField
-
processDateTimeField
-
processBytesField
-
processNestedBytesField
-
processByteBufferField
-
processArrayOfStringField
-
processArrayOfNestedStringField
public void processArrayOfNestedStringField(RowBundles.ArrayOfNestedStringBundle state, Blackhole bh) -
processMapOfIntField
-
processMapOfNestedIntField
-