Class AbstractRWLogger

java.lang.Object
io.perl.logger.impl.ResultsLogger
io.sbk.logger.impl.AbstractRWLogger
All Implemented Interfaces:
io.perl.api.ReportLatency, io.perl.logger.PerformanceLogger, io.perl.logger.Print, CountReaders, CountRW, CountWriters, Logger, ReadRequestsLogger, RWLogger, RWPrint, SetRW, WriteRequestsLogger
Direct Known Subclasses:
SystemLogger

public abstract class AbstractRWLogger extends io.perl.logger.impl.ResultsLogger implements RWLogger, SetRW
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Add the Metric type specific command line arguments.
    protected final void
    appendResultString(StringBuilder out, 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 readResponsePendingBytes, long readResponsePendingRecords, 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[] percentileValues)
     
    protected final void
    appendWriteAndReadRequests(@NotNull StringBuilder out, long writeRequestBytes, double writeRequestMbPerSec, long writesRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestMbPerSec, long readRequestRecords, double readRequestRecordsPerSec)
     
    protected final void
    appendWriteAndReadRequestsPending(@NotNull StringBuilder out, long writeResponsePendingRecords, long writeResponsePendingBytes, long readResponsePendingBytes, long readResponsePendingRecords, long writeReadRequestPendingRecords, long writeReadRequestPendingBytes)
     
    protected final void
    appendWriteAndReadTimeoutEvents(@NotNull StringBuilder out, long writeTimeoutEvents, double writeTimeoutEventsPerSec, long readTimeoutEvents, double readeTimeoutEventsPerSec)
     
    protected final void
    appendWritesAndReaders(@NotNull StringBuilder out, int writers, int maxWriters, int readers, int maxReaders)
     
    void
    Close the Logger.
    void
    Decrement Readers.
    void
    Decrement Writers.
    protected final Action
     
     
    int
    Default method to indicate to record read requests or not.
    protected final int
     
    int
    Default method to indicate to record write requests or not.
    protected final int
     
    int
     
    protected final int
     
    protected final String
     
    protected final io.time.Time
     
    protected final int
     
    void
    Increment Readers.
    void
    Increment Writers.
    final boolean
     
    final boolean
     
    void
    open(ParsedOptions params, String storageName, Action action, io.time.Time time)
    Open the Logger.
    void
    Parse the Metric specific command line arguments.
    final void
    print(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[] percentileValues)
     
    void
    print(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[] percentileValues)
    Print the Periodic performance results.
    final void
    printTotal(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[] percentileValues)
     
    void
    printTotal(int writers, int maxWriters, int readers, int maxReaders, long writeRequestBytes, double writeRequestMbPerSec, long writeRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestsMbPerSec, 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[] percentileValues)
     
    void
    recordReadRequests(int readerId, long startTime, long bytes, long events)
    Default method to record every/multiple read event(s).
    void
    recordReadTimeoutEvents(int readerId, long startTime, long timeoutEvents)
     
    void
    recordWriteRequests(int writerId, long startTime, long bytes, long events)
    Default method to record every/multiple write event(s).
    void
    recordWriteTimeoutEvents(int writerId, long startTime, long timeoutEvents)
     
    final void
    setMaxReaders(int val)
    Set Max Readers.
    protected final void
    setMaxReadersIds(int maxReaderRequestIds)
     
    final void
    setMaxWriters(int val)
    Set Max Writers.
    protected final void
    setMaxWritersIds(int maxWriterRequestIds)
     
    final void
    setReaders(int val)
    Set Readers.
    final void
    setWriters(int val)
    Set Writers.

    Methods inherited from class io.perl.logger.impl.ResultsLogger

    appendResultString, getMaxLatency, getMinLatency, getPercentileNames, getPercentiles, getPrefix, getTimeUnit, setMaxLatency, setMinLatency, setPercentiles, setPrefix, setTimeUnit

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.sbk.logger.Logger

    setExceptionHandler

    Methods inherited from interface io.perl.logger.PerformanceLogger

    getMaxLatency, getMinLatency, getPercentiles, getTimeUnit

    Methods inherited from interface io.sbk.logger.RWLogger

    recordLatency
  • Constructor Details

    • AbstractRWLogger

      public AbstractRWLogger()
  • Method Details

    • addArgs

      public void addArgs(InputOptions params) throws IllegalArgumentException
      Description copied from interface: Logger
      Add the Metric type specific command line arguments.
      Specified by:
      addArgs in interface Logger
      Parameters:
      params - InputOptions object to be extended.
      Throws:
      IllegalArgumentException - If an exception occurred.
    • parseArgs

      public void parseArgs(ParsedOptions params) throws IllegalArgumentException
      Description copied from interface: Logger
      Parse the Metric specific command line arguments.
      Specified by:
      parseArgs in interface Logger
      Parameters:
      params - InputOptions object to be parsed for driver specific parameters/arguments.
      Throws:
      IllegalArgumentException - If an exception occurred.
    • open

      public void open(ParsedOptions params, String storageName, Action action, io.time.Time time) throws IOException
      Description copied from interface: Logger
      Open the Logger.
      Specified by:
      open in interface Logger
      Parameters:
      params - InputOptions object to be parsed for driver specific parameters/arguments.
      storageName - The Name of the storage.
      action - action to print
      time - time interface
      Throws:
      IOException - If an exception occurred.
    • close

      public void close(ParsedOptions params) throws IOException
      Description copied from interface: Logger
      Close the Logger.
      Specified by:
      close in interface Logger
      Parameters:
      params - InputOptions object to be parsed for driver specific parameters/arguments.
      Throws:
      IOException - If an exception occurred.
    • getMaxWriterIDs

      public int getMaxWriterIDs()
      Description copied from interface: RWLogger
      Default method to indicate to record write requests or not.
      Specified by:
      getMaxWriterIDs in interface RWLogger
      Specified by:
      getMaxWriterIDs in interface WriteRequestsLogger
    • getMaxReaderIDs

      public int getMaxReaderIDs()
      Description copied from interface: RWLogger
      Default method to indicate to record read requests or not.
      Specified by:
      getMaxReaderIDs in interface ReadRequestsLogger
      Specified by:
      getMaxReaderIDs in interface RWLogger
    • getPrintingIntervalSeconds

      public int getPrintingIntervalSeconds()
      Specified by:
      getPrintingIntervalSeconds in interface io.perl.logger.PerformanceLogger
    • incrementWriters

      public void incrementWriters()
      Description copied from interface: CountWriters
      Increment Writers.
      Specified by:
      incrementWriters in interface CountWriters
    • decrementWriters

      public void decrementWriters()
      Description copied from interface: CountWriters
      Decrement Writers.
      Specified by:
      decrementWriters in interface CountWriters
    • incrementReaders

      public void incrementReaders()
      Description copied from interface: CountReaders
      Increment Readers.
      Specified by:
      incrementReaders in interface CountReaders
    • decrementReaders

      public void decrementReaders()
      Description copied from interface: CountReaders
      Decrement Readers.
      Specified by:
      decrementReaders in interface CountReaders
    • recordWriteRequests

      public void recordWriteRequests(int writerId, long startTime, long bytes, long events)
      Description copied from interface: RWLogger
      Default method to record every/multiple write event(s).
      Specified by:
      recordWriteRequests in interface RWLogger
      Specified by:
      recordWriteRequests in interface WriteRequestsLogger
    • recordWriteTimeoutEvents

      public void recordWriteTimeoutEvents(int writerId, long startTime, long timeoutEvents)
      Specified by:
      recordWriteTimeoutEvents in interface WriteRequestsLogger
    • recordReadRequests

      public void recordReadRequests(int readerId, long startTime, long bytes, long events)
      Description copied from interface: RWLogger
      Default method to record every/multiple read event(s).
      Specified by:
      recordReadRequests in interface ReadRequestsLogger
      Specified by:
      recordReadRequests in interface RWLogger
    • recordReadTimeoutEvents

      public void recordReadTimeoutEvents(int readerId, long startTime, long timeoutEvents)
      Specified by:
      recordReadTimeoutEvents in interface ReadRequestsLogger
    • getLoggerConfigStream

      public InputStream getLoggerConfigStream()
    • getStorageName

      protected final String getStorageName()
    • getTime

      protected final io.time.Time getTime()
    • getAction

      protected final Action getAction()
    • setMaxWritersIds

      protected final void setMaxWritersIds(int maxWriterRequestIds)
    • setMaxReadersIds

      protected final void setMaxReadersIds(int maxReaderRequestIds)
    • getWritersCount

      protected final int getWritersCount()
    • getReadersCount

      protected final int getReadersCount()
    • getMaxWritersCount

      protected final int getMaxWritersCount()
    • getMaxReadersCount

      protected final int getMaxReadersCount()
    • setWriters

      public final void setWriters(int val)
      Description copied from interface: SetRW
      Set Writers.
      Specified by:
      setWriters in interface SetRW
      Parameters:
      val - new value.
    • setMaxWriters

      public final void setMaxWriters(int val)
      Description copied from interface: SetRW
      Set Max Writers.
      Specified by:
      setMaxWriters in interface SetRW
      Parameters:
      val - new value.
    • setReaders

      public final void setReaders(int val)
      Description copied from interface: SetRW
      Set Readers.
      Specified by:
      setReaders in interface SetRW
      Parameters:
      val - new value.
    • setMaxReaders

      public final void setMaxReaders(int val)
      Description copied from interface: SetRW
      Set Max Readers.
      Specified by:
      setMaxReaders in interface SetRW
      Parameters:
      val - new value.
    • isWriteRequestsEnabled

      public final boolean isWriteRequestsEnabled()
    • isReadRequestsEnabled

      public final boolean isReadRequestsEnabled()
    • appendWritesAndReaders

      protected final void appendWritesAndReaders(@NotNull @NotNull StringBuilder out, int writers, int maxWriters, int readers, int maxReaders)
    • appendWriteAndReadRequests

      protected final void appendWriteAndReadRequests(@NotNull @NotNull StringBuilder out, long writeRequestBytes, double writeRequestMbPerSec, long writesRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestMbPerSec, long readRequestRecords, double readRequestRecordsPerSec)
    • appendWriteAndReadRequestsPending

      protected final void appendWriteAndReadRequestsPending(@NotNull @NotNull StringBuilder out, long writeResponsePendingRecords, long writeResponsePendingBytes, long readResponsePendingBytes, long readResponsePendingRecords, long writeReadRequestPendingRecords, long writeReadRequestPendingBytes)
    • appendWriteAndReadTimeoutEvents

      protected final void appendWriteAndReadTimeoutEvents(@NotNull @NotNull StringBuilder out, long writeTimeoutEvents, double writeTimeoutEventsPerSec, long readTimeoutEvents, double readeTimeoutEventsPerSec)
    • appendResultString

      protected final void appendResultString(StringBuilder out, 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 readResponsePendingBytes, long readResponsePendingRecords, 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[] percentileValues)
    • print

      public final void print(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[] percentileValues)
      Specified by:
      print in interface io.perl.logger.Print
      Overrides:
      print in class io.perl.logger.impl.ResultsLogger
    • print

      public void print(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[] percentileValues)
      Description copied from interface: RWPrint
      Print the Periodic performance results.
      Specified by:
      print in interface RWPrint
      Parameters:
      writers - number of active writers
      maxWriters - Max writers
      readers - number of active readers
      maxReaders - Max Readers
      writeRequestBytes - Write requests Bytes
      writeRequestMbPerSec - Write requests MB/sec
      writeRequestRecords - Write Requests
      writeRequestRecordsPerSec - Write Requests/sec
      readRequestBytes - Read requests Bytes
      readRequestMbPerSec - Read requests MB/sec
      readRequestRecords - Read requests
      readRequestRecordsPerSec - Read Requests/sec
      writeResponsePendingRecords - Write response pending records
      writeResponsePendingBytes - Write response pending bytes
      readResponsePendingRecords - Read response pending records
      readResponsePendingBytes - Read response pending bytes
      writeReadRequestPendingRecords - Write read pending records
      writeReadRequestPendingBytes - Write read pending bytes
      writeTimeoutEvents - Timeout Write Events
      writeTimeoutEventsPerSec - Timeout Write Events/sec
      readTimeoutEvents - Timeout Read Events
      readTimeoutEventsPerSec - Timeout Write Events/sec
      seconds - reporting duration in seconds
      bytes - number of bytes read/write
      records - data to write.
      recsPerSec - records per second.
      mbPerSec - Throughput value in terms of MB (Mega Bytes) per Second.
      avgLatency - Average Latency.
      minLatency - Minimum Latency.
      maxLatency - Maximum Latency.
      invalid - Number of invalid/negative latencies.
      lowerDiscard - number of discarded latencies which are less than minimum latency.
      higherDiscard - number of discarded latencies which are higher than maximum latency.
      slc1 - Sliding Latency Coverage factor
      slc2 - Sliding Latency Coverage factor
      percentileValues - Array of percentile Values.
    • printTotal

      public final void printTotal(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[] percentileValues)
      Specified by:
      printTotal in interface io.perl.logger.PerformanceLogger
      Overrides:
      printTotal in class io.perl.logger.impl.ResultsLogger
    • printTotal

      public void printTotal(int writers, int maxWriters, int readers, int maxReaders, long writeRequestBytes, double writeRequestMbPerSec, long writeRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestsMbPerSec, 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[] percentileValues)
      Specified by:
      printTotal in interface RWLogger