Class PrometheusLogger
java.lang.Object
io.perl.logger.impl.ResultsLogger
io.sbk.logger.impl.AbstractRWLogger
io.sbk.logger.impl.SystemLogger
io.sbk.logger.impl.CSVLogger
io.sbk.logger.impl.PrometheusLogger
- All Implemented Interfaces:
io.perl.logger.PerformanceLogger, io.perl.logger.Print, io.perl.logger.ReportLatency, CountReaders, CountRW, CountWriters, Logger, ReadRequestsLogger, RWLogger, RWPrint, SetRW, WriteRequestsLogger
- Direct Known Subclasses:
GrpcLogger
Class for Recoding/Printing benchmark results on micrometer Composite Meter Registry.
-
Field Summary
Fields inherited from class CSVLogger
DISABLE_STRING, REGULAR_PRINT, TOTAL_PRINT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddArgs(InputOptions params) Add the Metric type specific command line arguments.voidclose(ParsedOptions params) Close the logger and stop the HTTP server if it was started.protected final MetricsConfigvoidopen(ParsedOptions params, String storageName, Action action, io.time.Time time) Open the logger and, if metrics are enabled, start the Prometheus HTTP server.voidparseArgs(ParsedOptions params) Parse the Metric specific command line arguments.voidprint(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 periodic results toSystem.outat the end of each interval.Methods inherited from class CSVLogger
getCsvFile, isCsvEnable, openCSV, printTotal, writeToCSVMethods inherited from class AbstractRWLogger
appendResultString, appendWriteAndReadRequests, appendWriteAndReadRequestsPending, appendWriteAndReadTimeoutEvents, appendWritesAndReaders, decrementReaders, decrementWriters, getAction, getLoggerConfigStream, getMaxReaderIDs, getMaxReadersCount, getMaxWriterIDs, getMaxWritersCount, getPrintingIntervalSeconds, getReadersCount, getStorageName, getTime, getWritersCount, incrementReaders, incrementWriters, isReadRequestsEnabled, isWriteRequestsEnabled, print, printTotal, recordReadRequests, recordReadTimeoutEvents, recordWriteRequests, recordWriteTimeoutEvents, setMaxReaders, setMaxReadersIds, setMaxWriters, setMaxWritersIds, setReaders, setWritersMethods inherited from class io.perl.logger.impl.ResultsLogger
appendResultString, getMaxLatency, getMinLatency, getPercentileNames, getPercentiles, getPrefix, getTimeUnit, setMaxLatency, setMinLatency, setPercentiles, setPrefix, setTimeUnitMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Logger
setExceptionHandlerMethods inherited from interface io.perl.logger.PerformanceLogger
getMaxLatency, getMinLatency, getPercentiles, getTimeUnit, recordLatency
-
Constructor Details
-
PrometheusLogger
public PrometheusLogger()
-
-
Method Details
-
getPrometheusRWMetricsServer
- Throws:
IOException
-
getMetricsConfigStream
-
getMetricsConfig
-
addArgs
-
parseArgs
Description copied from interface:LoggerParse the Metric specific command line arguments.- Specified by:
parseArgsin interfaceLogger- Overrides:
parseArgsin classCSVLogger- Parameters:
params- ParsedOptions containing driver/logger 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 Open the logger and, if metrics are enabled, start the Prometheus HTTP server.- Specified by:
openin interfaceLogger- Overrides:
openin classCSVLogger- Parameters:
params- ParsedOptions including logger-specific configuration.storageName- The Name of the storage.action- action to printtime- time interface- Throws:
IOException- If an exception occurred.IllegalArgumentException
-
close
Close the logger and stop the HTTP server if it was started.- Specified by:
closein interfaceLogger- Overrides:
closein classCSVLogger- Parameters:
params- ParsedOptions used during open; may carry shutdown options.- 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[] percentileLatencies, long[] percentileLatencyCounts) Description copied from class:SystemLoggerPrint the periodic results toSystem.outat the end of each interval.- Specified by:
printin interfaceRWPrint- Overrides:
printin classCSVLogger- Parameters:
writers- number of active writersmaxWriters- maximum writers seenreaders- number of active readersmaxReaders- maximum readers seenwriteRequestBytes- write request bytes in this intervalwriteRequestMbPerSec- write request throughput in MB/secwriteRequestRecords- write request countwriteRequestRecordsPerSec- write requests per secondreadRequestBytes- read request bytes in this intervalreadRequestMbPerSec- read request throughput in MB/secreadRequestRecords- read request countreadRequestRecordsPerSec- read requests per secondwriteResponsePendingRecords- pending write response recordswriteResponsePendingBytes- pending write response bytesreadResponsePendingRecords- pending read response recordsreadResponsePendingBytes- pending read response byteswriteReadRequestPendingRecords- write-read pending records deltawriteReadRequestPendingBytes- write-read pending bytes deltawriteTimeoutEvents- write timeout events countwriteTimeoutEventsPerSec- write timeout events per secondreadTimeoutEvents- read timeout events countreadTimeoutEventsPerSec- read timeout events per secondseconds- reporting interval secondsbytes- total bytes processed in intervalrecords- total records processed in intervalrecsPerSec- records per secondmbPerSec- MB per secondavgLatency- average latencyminLatency- minimum latencymaxLatency- maximum latencyinvalid- invalid/negative latency countlowerDiscard- discarded below min latencyhigherDiscard- discarded above max latencyslc1- sliding latency coverage 1slc2- sliding latency coverage 2percentileLatencies- percentile latency valuespercentileLatencyCounts- percentile latency counts
-