Class PrometheusLogger

java.lang.Object
io.perl.logger.impl.ResultsLogger
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:
GrpcLogger

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

    • PrometheusLogger

      public PrometheusLogger()
  • Method Details

    • getPrometheusRWMetricsServer

      public SbkPrometheusServer getPrometheusRWMetricsServer() throws IOException
      Throws:
      IOException
    • getMetricsConfigStream

      public InputStream getMetricsConfigStream()
    • getMetricsConfig

      protected final MetricsConfig getMetricsConfig()
    • 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 CSVLogger
      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 CSVLogger
      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 CSVLogger
      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 CSVLogger
      Parameters:
      params - InputOptions object to be parsed for driver specific parameters/arguments.
      Throws:
      IOException - If an exception occurred.
      IllegalArgumentException
    • 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 CSVLogger
      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.