Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/**
* Copyright (c) KMG. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*/
package io.sbk.logger.impl;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* Class for recoding/printing results on Sl4j.
*/
public class Sl4jLogger extends SystemLogger {
final private Logger log;
public Sl4jLogger() {
super();
log = LoggerFactory.getLogger("SBK");
}
@Override
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) {
StringBuilder out = new StringBuilder(getPrefix());
appendResultString(out, writers, maxWriters, readers, maxReaders,
writeRequestBytes, writeRequestMbPerSec, writeRequestRecords, writeRequestRecordsPerSec,
readRequestBytes, readRequestMbPerSec, readRequestRecords, readRequestRecordsPerSec,
writeResponsePendingRecords, writeResponsePendingBytes, readResponsePendingRecords,
readResponsePendingBytes, writeReadRequestPendingRecords, writeReadRequestPendingBytes,
writeTimeoutEvents, writeTimeoutEventsPerSec, readTimeoutEvents, readTimeoutEventsPerSec,
seconds, bytes, records, recsPerSec, mbPerSec, avgLatency, minLatency, maxLatency, invalid, lowerDiscard,
higherDiscard, slc1, slc2, percentileValues);
log.info(out.toString());
}
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) {
StringBuilder out = new StringBuilder("Total " + getPrefix());
appendResultString(out, writers, maxWriters, readers, maxReaders,
writeRequestBytes, writeRequestMbPerSec, writeRequestRecords, writeRequestRecordsPerSec,
readRequestBytes, readRequestsMbPerSec, readRequestRecords, readRequestRecordsPerSec,
writeResponsePendingRecords, writeResponsePendingBytes, readResponsePendingRecords,
readResponsePendingBytes, writeReadRequestPendingRecords, writeReadRequestPendingBytes,
writeTimeoutEvents, writeTimeoutEventsPerSec, readTimeoutEvents, readTimeoutEventsPerSec,
seconds, bytes, records, recsPerSec, mbPerSec, avgLatency, minLatency, maxLatency, invalid, lowerDiscard,
higherDiscard, slc1, slc2, percentileValues);
log.info(out.toString());
}
}