Package io.sbk.logger.impl
Class GrpcLogger
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
io.sbk.logger.impl.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
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.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.void
recordLatency
(long startTime, int events, int bytes, long latency) record every latency.void
recordReadRequests
(int readerId, long startTime, long bytes, long events) Default method to record every/multiple read event(s).void
recordReadTimeoutEvents
(int writerId, long startTime, long events) void
recordWriteRequests
(int writerId, long startTime, long bytes, long events) Default method to record every/multiple write event(s).void
recordWriteTimeoutEvents
(int readerId, long startTime, long events) void
Sends Latencies Records.void
setExceptionHandler
(io.perl.exception.ExceptionHandler handler) Default implementation for setting exception handler.Methods inherited from class io.sbk.logger.impl.PrometheusLogger
getMetricsConfig, getMetricsConfigStream, getPrometheusRWMetricsServer
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, 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.perl.logger.PerformanceLogger
getMaxLatency, getMinLatency, getPercentiles, getTimeUnit
-
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
Description copied from interface:Logger
Add the Metric type specific command line arguments.- Specified by:
addArgs
in interfaceLogger
- Overrides:
addArgs
in classPrometheusLogger
- 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 classPrometheusLogger
- 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 classPrometheusLogger
- 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 classPrometheusLogger
- 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 interfaceRWLogger
- Specified by:
recordWriteRequests
in interfaceWriteRequestsLogger
- Overrides:
recordWriteRequests
in classAbstractRWLogger
-
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 interfaceReadRequestsLogger
- Specified by:
recordReadRequests
in interfaceRWLogger
- Overrides:
recordReadRequests
in classAbstractRWLogger
-
recordWriteTimeoutEvents
public void recordWriteTimeoutEvents(int readerId, long startTime, long events) - Specified by:
recordWriteTimeoutEvents
in interfaceWriteRequestsLogger
- Overrides:
recordWriteTimeoutEvents
in classAbstractRWLogger
-
recordReadTimeoutEvents
public void recordReadTimeoutEvents(int writerId, long startTime, long events) - Specified by:
recordReadTimeoutEvents
in interfaceReadRequestsLogger
- Overrides:
recordReadTimeoutEvents
in classAbstractRWLogger
-
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 interfaceRWPrint
- Overrides:
print
in classPrometheusLogger
- 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.
-