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 Type
    Method
    Description
    void
    Add the Metric type specific command line arguments.
    void
    Close the Logger.
    void
    open(ParsedOptions params, String storageName, Action action, io.time.Time time)
    Open the Logger.
    void
    Parse the Metric specific command line arguments.
    default void
    setExceptionHandler(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, recordLatency

    Methods inherited from interface io.perl.logger.Print

    print
  • Method Details

    • addArgs

      void addArgs(InputOptions params) throws IllegalArgumentException
      Add the Metric type specific command line arguments.
      Parameters:
      params - InputOptions object to be extended.
      Throws:
      IllegalArgumentException - If an exception occurred.
    • parseArgs

      void parseArgs(ParsedOptions params) throws IllegalArgumentException
      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 print
      time - time interface
      Throws:
      IOException - If an exception occurred.
    • close

      void close(ParsedOptions params) throws IOException
      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