Class SbkWriter
java.lang.Object
io.sbk.api.Worker
io.sbk.api.impl.SbkWriter
- All Implemented Interfaces:
io.perl.api.RunBenchmark
Writer Benchmarking Implementation.
This class adapts a DataWriter into the SBK harness
by implementing the RunBenchmark contract. It constructs
a payload using the configured DataType and exposes
benchmark variants (time-based, count-based, sync/batched and with optional
write-request logging).
Key responsibilities:
- Create and manage per-writer payload and lifecycle.
- Select and execute the appropriate benchmark variant based on
ParameterOptions. - Coordinate rate control using
SbkRateControllerwhen a target throughput is configured.
-
Field Summary
Fields inherited from class Worker
id, params, perlChannel -
Constructor Summary
ConstructorsConstructorDescriptionSbkWriter(int writerID, ParameterOptions params, io.perl.api.PerlChannel perlChannel, @NotNull DataType<Object> dType, io.time.Time time, DataWriter<Object> writer, CountWriters wCount, WriteRequestsLogger requestsLogger, ExecutorService executor) -
Method Summary
-
Constructor Details
-
SbkWriter
public SbkWriter(int writerID, ParameterOptions params, io.perl.api.PerlChannel perlChannel, @NotNull @NotNull DataType<Object> dType, io.time.Time time, DataWriter<Object> writer, CountWriters wCount, WriteRequestsLogger requestsLogger, ExecutorService executor)
-
-
Method Details
-
run
public CompletableFuture<Void> run(long secondsToRun, long recordsCount) throws IOException, EOFException, IllegalStateException - Specified by:
runin interfaceio.perl.api.RunBenchmark- Throws:
IOExceptionEOFExceptionIllegalStateException
-