Package io.sbk.logger.impl
Class CSVLogger
java.lang.Object
io.perl.logger.impl.ResultsLogger
io.sbk.logger.impl.AbstractRWLogger
io.sbk.logger.impl.SystemLogger
io.sbk.logger.impl.CSVLogger
- 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:
PrometheusLogger
Class for recoding/printing results to a CSV file called `out.csv`.
-
Field Summary
-
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 String
protected final boolean
void
open
(ParsedOptions params, String storageName, Action action, io.time.Time time) Open the Logger.final void
openCSV()
final public method to Open CSV.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
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) final void
writeToCSV
(String header, String type, long connections, long maxConnections, 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) final public method to write CSV.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
-
Field Details
-
DISABLE_STRING
DISABLE_STRING = "no"
.- See Also:
-
REGULAR_PRINT
REGULAR_PRINT = "Regular"
.- See Also:
-
TOTAL_PRINT
TOTAL_PRINT = "Total"
.- See Also:
-
-
Constructor Details
-
CSVLogger
public CSVLogger()calls its super class SystemLogger.
-
-
Method Details
-
isCsvEnable
protected final boolean isCsvEnable() -
getCsvFile
-
addArgs
Description copied from interface:Logger
Add the Metric type specific command line arguments.- Specified by:
addArgs
in interfaceLogger
- Overrides:
addArgs
in classAbstractRWLogger
- 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 classAbstractRWLogger
- Parameters:
params
- InputOptions object to be parsed for driver specific parameters/arguments.- Throws:
IllegalArgumentException
- If an exception occurred.
-
openCSV
final public method to Open CSV.- Throws:
IOException
- 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
- Overrides:
open
in classAbstractRWLogger
- 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.
-
writeToCSV
public final void writeToCSV(String header, String type, long connections, long maxConnections, 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) final public method to write CSV.- Parameters:
header
- Stringtype
- Stringconnections
- longmaxConnections
- longwriters
- 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 BytesreadRequestsMbPerSec
- 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.
-
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 classSystemLogger
- 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 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
- Overrides:
printTotal
in classSystemLogger
-
close
Description copied from interface:Logger
Close the Logger.- Specified by:
close
in interfaceLogger
- Overrides:
close
in classAbstractRWLogger
- Parameters:
params
- InputOptions object to be parsed for driver specific parameters/arguments.- Throws:
IOException
- If an exception occurred.
-