Class GrpcLogger

All Implemented Interfaces:
io.perl.api.ReportLatency, io.perl.logger.PerformanceLogger, io.perl.logger.Print, CountReaders, CountRW, CountWriters, Logger, ReadRequestsLogger, RWLogger, RWPrint, SetRW, WriteRequestsLogger

public class GrpcLogger extends PrometheusLogger
Class for Recoding/Printing benchmark results on micrometer Composite Meter Registry.
  • Constructor Details

    • GrpcLogger

      public GrpcLogger()
      calls its super class PrometheusLogger.
  • Method Details

    • setExceptionHandler

      public void setExceptionHandler(io.perl.exception.ExceptionHandler handler)
      Description copied from interface: Logger
      Default implementation for setting exception handler. if the logger encounters any exception, it can report to SBK.
      Parameters:
      handler - Exception handler
    • 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
      Overrides:
      addArgs in class PrometheusLogger
      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
      Overrides:
      parseArgs in class PrometheusLogger
      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 IllegalArgumentException, IOException
      Description copied from interface: Logger
      Open the Logger.
      Specified by:
      open in interface Logger
      Overrides:
      open in class PrometheusLogger
      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.
      IllegalArgumentException
    • close

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

      public void sendLatenciesRecord()
      Sends Latencies Records.
    • 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
      Overrides:
      recordWriteRequests in class AbstractRWLogger
    • 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
      Overrides:
      recordReadRequests in class AbstractRWLogger
    • recordWriteTimeoutEvents

      public void recordWriteTimeoutEvents(int readerId, long startTime, long events)
      Specified by:
      recordWriteTimeoutEvents in interface WriteRequestsLogger
      Overrides:
      recordWriteTimeoutEvents in class AbstractRWLogger
    • recordReadTimeoutEvents

      public void recordReadTimeoutEvents(int writerId, long startTime, long events)
      Specified by:
      recordReadTimeoutEvents in interface ReadRequestsLogger
      Overrides:
      recordReadTimeoutEvents in class AbstractRWLogger
    • recordLatency

      public void recordLatency(long startTime, int events, int bytes, long latency)
      record every latency.
    • 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
      Overrides:
      print in class PrometheusLogger
      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.