Class GetterBasedSchemaProviderBenchmark

java.lang.Object
org.apache.beam.sdk.jmh.schemas.GetterBasedSchemaProviderBenchmark

public class GetterBasedSchemaProviderBenchmark extends Object
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.