Interface Logger
- All Superinterfaces:
io.perl.logger.PerformanceLogger, io.perl.logger.Print, io.perl.logger.ReportLatency
- All Known Subinterfaces:
RWLogger
- All Known Implementing Classes:
AbstractRWLogger, CSVLogger, GrpcLogger, PrometheusLogger, Sl4jLogger, SystemLogger
public interface Logger
extends io.perl.logger.PerformanceLogger
Primary logging interface for SBK benchmarks to configure, open, and close metrics reporting.
Implementations are responsible for:
- Adding and parsing metric-specific CLI arguments via
addArgs(InputOptions) and
parseArgs(ParsedOptions).
- Initializing resources on open(ParsedOptions, String, Action, Time) and releasing them
on close(ParsedOptions).
- Optionally integrating with SBK's ExceptionHandler using setExceptionHandler(ExceptionHandler).-
Method Summary
Modifier and TypeMethodDescriptionvoidaddArgs(InputOptions params) Add the Metric type specific command line arguments.voidclose(ParsedOptions params) Close the Logger.voidopen(ParsedOptions params, String storageName, Action action, io.time.Time time) Open the Logger.voidparseArgs(ParsedOptions params) Parse the Metric specific command line arguments.default voidsetExceptionHandler(io.perl.exception.ExceptionHandler handler) Default implementation for setting exception handler.Methods inherited from interface io.perl.logger.PerformanceLogger
getMaxLatency, getMinLatency, getPercentiles, getPrintingIntervalSeconds, getTimeUnit, printTotal, recordLatencyMethods inherited from interface io.perl.logger.Print
print
-
Method Details
-
addArgs
Add the Metric type specific command line arguments.- Parameters:
params- InputOptions object to be extended.- Throws:
IllegalArgumentException- If an exception occurred.
-
parseArgs
Parse the Metric specific command line arguments.- Parameters:
params- ParsedOptions containing driver/logger specific parameters/arguments.- Throws:
IllegalArgumentException- If an exception occurred.
-
open
void open(ParsedOptions params, String storageName, Action action, io.time.Time time) throws IOException Open the Logger.- Parameters:
params- ParsedOptions including logger-specific configuration.storageName- The Name of the storage.action- action to printtime- time interface- Throws:
IOException- If an exception occurred.
-
close
Close the Logger.- Parameters:
params- ParsedOptions used during open; may carry shutdown options.- Throws:
IOException- If an exception occurred.
-
setExceptionHandler
default void setExceptionHandler(io.perl.exception.ExceptionHandler handler) Default implementation for setting exception handler. if the logger encounters any exception, it can report to SBK.- Parameters:
handler- Exception handler
-