Package io.sbk.logger.impl
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.api.ReportLatency
,io.perl.logger.PerformanceLogger
,io.perl.logger.Print
,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 io.sbk.logger.impl.CSVLogger
DISABLE_STRING, REGULAR_PRINT, TOTAL_PRINT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addArgs
(InputOptions params) Add the Metric type specific command line arguments.void
close
(ParsedOptions params) Close the Logger.protected final MetricsConfig
void
open
(ParsedOptions params, String storageName, Action action, io.time.Time time) Open the Logger.void
parseArgs
(ParsedOptions params) Parse the Metric specific command line arguments.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.Methods inherited from class io.sbk.logger.impl.CSVLogger
getCsvFile, isCsvEnable, openCSV, printTotal, writeToCSV
Methods inherited from class io.sbk.logger.impl.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, setWriters
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
-
PrometheusLogger
public PrometheusLogger()
-
-
Method Details
-
getPrometheusRWMetricsServer
- Throws:
IOException
-
getMetricsConfigStream
-
getMetricsConfig
-
addArgs
Description copied from interface:Logger
Add the Metric type specific command line arguments.- Specified by:
addArgs
in interfaceLogger
- Overrides:
addArgs
in classCSVLogger
- Parameters:
params
- InputOptions object to be extended.- Throws:
IllegalArgumentException
- If an exception occurred.
-
parseArgs
Description copied from interface:Logger
Parse the Metric specific command line arguments.- Specified by:
parseArgs
in interfaceLogger
- Overrides:
parseArgs
in classCSVLogger
- 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 interfaceLogger
- Overrides:
open
in classCSVLogger
- Parameters:
params
- InputOptions object to be parsed for driver specific parameters/arguments.storageName
- The Name of the storage.action
- action to printtime
- time interface- Throws:
IOException
- If an exception occurred.IllegalArgumentException
-
close
Description copied from interface:Logger
Close the Logger.- Specified by:
close
in interfaceLogger
- Overrides:
close
in classCSVLogger
- 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 interfaceRWPrint
- Overrides:
print
in classCSVLogger
- Parameters:
writers
- number of active writersmaxWriters
- Max writersreaders
- number of active readersmaxReaders
- Max ReaderswriteRequestBytes
- Write requests ByteswriteRequestMbPerSec
- Write requests MB/secwriteRequestRecords
- Write RequestswriteRequestRecordsPerSec
- Write Requests/secreadRequestBytes
- Read requests BytesreadRequestMbPerSec
- Read requests MB/secreadRequestRecords
- Read requestsreadRequestRecordsPerSec
- Read Requests/secwriteResponsePendingRecords
- Write response pending recordswriteResponsePendingBytes
- Write response pending bytesreadResponsePendingRecords
- Read response pending recordsreadResponsePendingBytes
- Read response pending byteswriteReadRequestPendingRecords
- Write read pending recordswriteReadRequestPendingBytes
- Write read pending byteswriteTimeoutEvents
- Timeout Write EventswriteTimeoutEventsPerSec
- Timeout Write Events/secreadTimeoutEvents
- Timeout Read EventsreadTimeoutEventsPerSec
- Timeout Write Events/secseconds
- reporting duration in secondsbytes
- number of bytes read/writerecords
- 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 factorslc2
- Sliding Latency Coverage factorpercentileValues
- Array of percentile Values.
-