Interface RWLogger

All Superinterfaces:
CountReaders, CountRW, CountWriters, Logger, io.perl.logger.PerformanceLogger, io.perl.logger.Print, ReadRequestsLogger, io.perl.logger.ReportLatency, RWPrint, WriteRequestsLogger
All Known Implementing Classes:
AbstractRWLogger, CSVLogger, GrpcLogger, PrometheusLogger, Sl4jLogger, SystemLogger

public non-sealed interface RWLogger extends Logger, CountRW, WriteRequestsLogger, ReadRequestsLogger, RWPrint
Read/Write logger interface that combines request logging and printing hooks. Extends Logger, CountRW, WriteRequestsLogger, ReadRequestsLogger, and RWPrint to provide a unified contract for SBK loggers capable of handling both read and write workloads. Default methods return neutral values or no-ops so that implementations can selectively override features.
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    Default method to indicate to record read requests or not.
    default int
    Default method to indicate to record write requests or not.
    void
    printTotal(int writers, int maxWriters, int readers, int maxReaders, long writeRequestBytes, double writeRequestMbPerSec, long writeRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestMBPerSec, long readRequestRecords, double readRequestRecordsPerSec, long writeResponsePendingRecords, long writeResponsePendingBytes, long readResponsePendingRecords, long readResponsePendingBytes, long writeReadRequestPendingRecords, long writeReadRequestPendingBytes, long writeTimeoutEvents, double writeTimeoutEventsPerSec, long readTimeoutEvents, double readTimeoutEventsPerSec, double seconds, long bytes, long records, double recsPerSec, double mbPerSec, double avgLatency, long minLatency, long maxLatency, long invalid, long lowerDiscard, long higherDiscard, long slc1, long slc2, long[] percentileLatencies, long[] percentileLatencyCounts)
    Print the "Total" roll-up, typically at the end of a benchmark run.
    default void
    recordReadRequests(int readerId, long startTime, long bytes, long events)
    Default method to record every/multiple read event(s).
    default void
    recordWriteRequests(int writerId, long startTime, long bytes, long events)
    Default method to record every/multiple write event(s).

    Methods inherited from interface CountReaders

    decrementReaders, incrementReaders

    Methods inherited from interface CountWriters

    decrementWriters, incrementWriters

    Methods inherited from interface Logger

    addArgs, close, open, parseArgs, setExceptionHandler

    Methods inherited from interface io.perl.logger.PerformanceLogger

    getMaxLatency, getMinLatency, getPercentiles, getPrintingIntervalSeconds, getTimeUnit, printTotal, recordLatency

    Methods inherited from interface io.perl.logger.Print

    print

    Methods inherited from interface ReadRequestsLogger

    recordReadTimeoutEvents

    Methods inherited from interface RWPrint

    print

    Methods inherited from interface WriteRequestsLogger

    recordWriteTimeoutEvents
  • Method Details

    • recordWriteRequests

      default void recordWriteRequests(int writerId, long startTime, long bytes, long events)
      Default method to record every/multiple write event(s). No-op by default.
      Specified by:
      recordWriteRequests in interface WriteRequestsLogger
      Parameters:
      writerId - logical writer identifier (0..N-1)
      startTime - write start time in the active TimeUnit
      bytes - bytes written for these events
      events - number of write events
    • recordReadRequests

      default void recordReadRequests(int readerId, long startTime, long bytes, long events)
      Default method to record every/multiple read event(s). No-op by default.
      Specified by:
      recordReadRequests in interface ReadRequestsLogger
      Parameters:
      readerId - logical reader identifier (0..N-1)
      startTime - read start time in the active TimeUnit
      bytes - bytes read for these events
      events - number of read events
    • getMaxWriterIDs

      default int getMaxWriterIDs()
      Default method to indicate to record write requests or not. Returning 0 disables per-writer request logging.
      Specified by:
      getMaxWriterIDs in interface WriteRequestsLogger
      Returns:
      max writer IDs
    • getMaxReaderIDs

      default int getMaxReaderIDs()
      Default method to indicate to record read requests or not. Returning 0 disables per-reader request logging.
      Specified by:
      getMaxReaderIDs in interface ReadRequestsLogger
      Returns:
      max reader IDs
    • printTotal

      void printTotal(int writers, int maxWriters, int readers, int maxReaders, long writeRequestBytes, double writeRequestMbPerSec, long writeRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestMBPerSec, long readRequestRecords, double readRequestRecordsPerSec, long writeResponsePendingRecords, long writeResponsePendingBytes, long readResponsePendingRecords, long readResponsePendingBytes, long writeReadRequestPendingRecords, long writeReadRequestPendingBytes, long writeTimeoutEvents, double writeTimeoutEventsPerSec, long readTimeoutEvents, double readTimeoutEventsPerSec, double seconds, long bytes, long records, double recsPerSec, double mbPerSec, double avgLatency, long minLatency, long maxLatency, long invalid, long lowerDiscard, long higherDiscard, long slc1, long slc2, long[] percentileLatencies, long[] percentileLatencyCounts)
      Parameters:
      writers - number of active writers
      maxWriters - maximum writers seen
      readers - number of active readers
      maxReaders - maximum readers seen
      writeRequestBytes - total write request bytes
      writeRequestMbPerSec - write request throughput in MB/sec
      writeRequestRecords - total write request count
      writeRequestRecordsPerSec - write requests per second
      readRequestBytes - total read request bytes
      readRequestMBPerSec - read request throughput in MB/sec
      readRequestRecords - total read request count
      readRequestRecordsPerSec - read requests per second
      writeResponsePendingRecords - pending write response records
      writeResponsePendingBytes - pending write response bytes
      readResponsePendingRecords - pending read response records
      readResponsePendingBytes - pending read response bytes
      writeReadRequestPendingRecords - write-read pending records delta
      writeReadRequestPendingBytes - write-read pending bytes delta
      writeTimeoutEvents - write timeout events count
      writeTimeoutEventsPerSec - write timeout events per second
      readTimeoutEvents - read timeout events count
      readTimeoutEventsPerSec - read timeout events per second
      seconds - total time in seconds
      bytes - total bytes processed
      records - total records processed
      recsPerSec - records per second
      mbPerSec - MB per second
      avgLatency - average latency
      minLatency - minimum latency
      maxLatency - maximum latency
      invalid - invalid/negative latency count
      lowerDiscard - discarded below min latency
      higherDiscard - discarded above max latency
      slc1 - sliding latency coverage 1
      slc2 - sliding latency coverage 2
      percentileLatencies - percentile latency values
      percentileLatencyCounts - percentile latency counts