Package io.sbk.logger.impl
Class AbstractRWLogger
java.lang.Object
io.perl.logger.impl.ResultsLogger
io.sbk.logger.impl.AbstractRWLogger
- 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:
SystemLogger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addArgs
(InputOptions params) Add the Metric type specific command line arguments.protected final void
appendResultString
(StringBuilder out, 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 readResponsePendingBytes, long readResponsePendingRecords, 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) protected final void
appendWriteAndReadRequests
(@NotNull StringBuilder out, long writeRequestBytes, double writeRequestMbPerSec, long writesRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestMbPerSec, long readRequestRecords, double readRequestRecordsPerSec) protected final void
appendWriteAndReadRequestsPending
(@NotNull StringBuilder out, long writeResponsePendingRecords, long writeResponsePendingBytes, long readResponsePendingBytes, long readResponsePendingRecords, long writeReadRequestPendingRecords, long writeReadRequestPendingBytes) protected final void
appendWriteAndReadTimeoutEvents
(@NotNull StringBuilder out, long writeTimeoutEvents, double writeTimeoutEventsPerSec, long readTimeoutEvents, double readeTimeoutEventsPerSec) protected final void
appendWritesAndReaders
(@NotNull StringBuilder out, int writers, int maxWriters, int readers, int maxReaders) void
close
(ParsedOptions params) Close the Logger.void
Decrement Readers.void
Decrement Writers.protected final Action
int
Default method to indicate to record read requests or not.protected final int
int
Default method to indicate to record write requests or not.protected final int
int
protected final int
protected final String
protected final io.time.Time
getTime()
protected final int
void
Increment Readers.void
Increment Writers.final boolean
final boolean
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.final void
print
(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) 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.final void
printTotal
(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) void
printTotal
(int writers, int maxWriters, int readers, int maxReaders, long writeRequestBytes, double writeRequestMbPerSec, long writeRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestsMbPerSec, 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) void
recordReadRequests
(int readerId, long startTime, long bytes, long events) Default method to record every/multiple read event(s).void
recordReadTimeoutEvents
(int readerId, long startTime, long timeoutEvents) void
recordWriteRequests
(int writerId, long startTime, long bytes, long events) Default method to record every/multiple write event(s).void
recordWriteTimeoutEvents
(int writerId, long startTime, long timeoutEvents) final void
setMaxReaders
(int val) Set Max Readers.protected final void
setMaxReadersIds
(int maxReaderRequestIds) final void
setMaxWriters
(int val) Set Max Writers.protected final void
setMaxWritersIds
(int maxWriterRequestIds) final void
setReaders
(int val) Set Readers.final void
setWriters
(int val) Set Writers.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
-
AbstractRWLogger
public AbstractRWLogger()
-
-
Method Details
-
addArgs
Description copied from interface:Logger
Add the Metric type specific command line arguments.- Specified by:
addArgs
in interfaceLogger
- 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
- 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 IOException Description copied from interface:Logger
Open the Logger.- Specified by:
open
in interfaceLogger
- 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.
-
close
Description copied from interface:Logger
Close the Logger.- Specified by:
close
in interfaceLogger
- Parameters:
params
- InputOptions object to be parsed for driver specific parameters/arguments.- Throws:
IOException
- If an exception occurred.
-
getMaxWriterIDs
public int getMaxWriterIDs()Description copied from interface:RWLogger
Default method to indicate to record write requests or not.- Specified by:
getMaxWriterIDs
in interfaceRWLogger
- Specified by:
getMaxWriterIDs
in interfaceWriteRequestsLogger
-
getMaxReaderIDs
public int getMaxReaderIDs()Description copied from interface:RWLogger
Default method to indicate to record read requests or not.- Specified by:
getMaxReaderIDs
in interfaceReadRequestsLogger
- Specified by:
getMaxReaderIDs
in interfaceRWLogger
-
getPrintingIntervalSeconds
public int getPrintingIntervalSeconds()- Specified by:
getPrintingIntervalSeconds
in interfaceio.perl.logger.PerformanceLogger
-
incrementWriters
public void incrementWriters()Description copied from interface:CountWriters
Increment Writers.- Specified by:
incrementWriters
in interfaceCountWriters
-
decrementWriters
public void decrementWriters()Description copied from interface:CountWriters
Decrement Writers.- Specified by:
decrementWriters
in interfaceCountWriters
-
incrementReaders
public void incrementReaders()Description copied from interface:CountReaders
Increment Readers.- Specified by:
incrementReaders
in interfaceCountReaders
-
decrementReaders
public void decrementReaders()Description copied from interface:CountReaders
Decrement Readers.- Specified by:
decrementReaders
in interfaceCountReaders
-
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
-
recordWriteTimeoutEvents
public void recordWriteTimeoutEvents(int writerId, long startTime, long timeoutEvents) - Specified by:
recordWriteTimeoutEvents
in interfaceWriteRequestsLogger
-
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
-
recordReadTimeoutEvents
public void recordReadTimeoutEvents(int readerId, long startTime, long timeoutEvents) - Specified by:
recordReadTimeoutEvents
in interfaceReadRequestsLogger
-
getLoggerConfigStream
-
getStorageName
-
getTime
protected final io.time.Time getTime() -
getAction
-
setMaxWritersIds
protected final void setMaxWritersIds(int maxWriterRequestIds) -
setMaxReadersIds
protected final void setMaxReadersIds(int maxReaderRequestIds) -
getWritersCount
protected final int getWritersCount() -
getReadersCount
protected final int getReadersCount() -
getMaxWritersCount
protected final int getMaxWritersCount() -
getMaxReadersCount
protected final int getMaxReadersCount() -
setWriters
public final void setWriters(int val) Description copied from interface:SetRW
Set Writers.- Specified by:
setWriters
in interfaceSetRW
- Parameters:
val
- new value.
-
setMaxWriters
public final void setMaxWriters(int val) Description copied from interface:SetRW
Set Max Writers.- Specified by:
setMaxWriters
in interfaceSetRW
- Parameters:
val
- new value.
-
setReaders
public final void setReaders(int val) Description copied from interface:SetRW
Set Readers.- Specified by:
setReaders
in interfaceSetRW
- Parameters:
val
- new value.
-
setMaxReaders
public final void setMaxReaders(int val) Description copied from interface:SetRW
Set Max Readers.- Specified by:
setMaxReaders
in interfaceSetRW
- Parameters:
val
- new value.
-
isWriteRequestsEnabled
public final boolean isWriteRequestsEnabled() -
isReadRequestsEnabled
public final boolean isReadRequestsEnabled() -
appendWritesAndReaders
protected final void appendWritesAndReaders(@NotNull @NotNull StringBuilder out, int writers, int maxWriters, int readers, int maxReaders) -
appendWriteAndReadRequests
protected final void appendWriteAndReadRequests(@NotNull @NotNull StringBuilder out, long writeRequestBytes, double writeRequestMbPerSec, long writesRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestMbPerSec, long readRequestRecords, double readRequestRecordsPerSec) -
appendWriteAndReadRequestsPending
protected final void appendWriteAndReadRequestsPending(@NotNull @NotNull StringBuilder out, long writeResponsePendingRecords, long writeResponsePendingBytes, long readResponsePendingBytes, long readResponsePendingRecords, long writeReadRequestPendingRecords, long writeReadRequestPendingBytes) -
appendWriteAndReadTimeoutEvents
protected final void appendWriteAndReadTimeoutEvents(@NotNull @NotNull StringBuilder out, long writeTimeoutEvents, double writeTimeoutEventsPerSec, long readTimeoutEvents, double readeTimeoutEventsPerSec) -
appendResultString
protected final void appendResultString(StringBuilder out, 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 readResponsePendingBytes, long readResponsePendingRecords, 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
public final void print(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) - Specified by:
print
in interfaceio.perl.logger.Print
- Overrides:
print
in classio.perl.logger.impl.ResultsLogger
-
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
- 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.
-
printTotal
public final void printTotal(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) - Specified by:
printTotal
in interfaceio.perl.logger.PerformanceLogger
- Overrides:
printTotal
in classio.perl.logger.impl.ResultsLogger
-
printTotal
public void printTotal(int writers, int maxWriters, int readers, int maxReaders, long writeRequestBytes, double writeRequestMbPerSec, long writeRequestRecords, double writeRequestRecordsPerSec, long readRequestBytes, double readRequestsMbPerSec, 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) - Specified by:
printTotal
in interfaceRWLogger
-