use special logger for insertion metrics
This allows us to enable/disable metric logging without having to log other stuff.
This commit is contained in:
@@ -32,6 +32,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
|
||||
public class PerformanceDb implements AutoCloseable, CollectionUtils {
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(PerformanceDb.class);
|
||||
private final static Logger METRICS_LOGGER = LoggerFactory.getLogger("org.lucares.metrics.ingestion.block");
|
||||
|
||||
private final TagsToFile tagsToFile;
|
||||
|
||||
@@ -65,7 +66,7 @@ public class PerformanceDb implements AutoCloseable, CollectionUtils {
|
||||
|
||||
public void put(final BlockingIterator<Entry> entries) throws WriteException {
|
||||
|
||||
final int blocksize = 10000;
|
||||
final int blocksize = 100000;
|
||||
long count = 0;
|
||||
|
||||
try {
|
||||
@@ -90,8 +91,8 @@ public class PerformanceDb implements AutoCloseable, CollectionUtils {
|
||||
if (count % blocksize == 0) {
|
||||
final long end = System.currentTimeMillis();
|
||||
final long duration = end - start;
|
||||
LOGGER.debug("inserting the last " + blocksize + " took " + duration + " ms; total entries: "
|
||||
+ count / 1_000_000.0 + " million");
|
||||
METRICS_LOGGER.debug("inserting the last " + blocksize + " took " + duration
|
||||
+ " ms; total entries: " + count / 1_000_000.0 + " million");
|
||||
|
||||
start = System.currentTimeMillis();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user