Class SbkBenchmark
java.lang.Object
io.sbk.api.impl.SbkBenchmark
- All Implemented Interfaces:
Benchmark
Class for performing the benchmark.
This class orchestrates the full lifecycle of an SBK benchmark run: it opens the storage client, constructs writer and reader instances, wires PerL-based metric collectors, schedules timeouts and executes the writers/readers concurrently using an executor pool.
Responsibilities include:
- Opening and closing the storage device lifecycle via
Storage. - Creating and managing multiple
DataWriterandDataReaderinstances. - Coordinating PerL metric collectors for writers and readers when enabled.
- Providing a fault-tolerant shutdown path and reporting via the configured
RWLogger.
Notes for maintainers:
- The class reserves executor threads based on configured writers/readers; adjust the thread accounting carefully.
- Perl-based metrics and timeouts are configured conditionally depending on writer/reader counts.
-
Constructor Summary
ConstructorsConstructorDescriptionSbkBenchmark(ParameterOptions params, Storage<Object> storage, DataType<Object> dType, @NotNull RWLogger rwLogger, io.time.Time time) Create SBK Benchmark. -
Method Summary
-
Constructor Details
-
SbkBenchmark
public SbkBenchmark(ParameterOptions params, Storage<Object> storage, DataType<Object> dType, @NotNull @NotNull RWLogger rwLogger, io.time.Time time) throws IOException Create SBK Benchmark.- Parameters:
params- Benchmarking input Parametersstorage- Storage device/client/driver for benchmarkingdType- Data Type.rwLogger- output loggertime- time interface- Throws:
IOException- If Exception occurs.
-
-
Method Details
-
start
public CompletableFuture<Void> start() throws IOException, InterruptedException, ExecutionException, IllegalStateExceptionStart SBK Benchmark. opens the storage device/client , creates the writers/readers. conducts the performance benchmarking for given time in seconds or exits if the input the number of records are written/read. NOTE: This method does NOT invoke parsing of parameters, storage device/client.- Specified by:
startin interfaceBenchmark- Returns:
- CompletableFuture that completes when the benchmark finishes
- Throws:
IOException- If an exception occurred.IllegalStateException- If an exception occurred.InterruptedException- If an exception occurredExecutionException- If an exception occurred
-
stop
-