reduce verbosity of performance logging
This commit is contained in:
@@ -154,7 +154,7 @@ public class DataStore implements AutoCloseable {
|
||||
final long start = System.nanoTime();
|
||||
writer.write(dateAsEpochMilli, value);
|
||||
final double duration = (System.nanoTime() - start) / 1_000_000.0;
|
||||
if (duration > 1) {
|
||||
if (duration > 10) {
|
||||
System.out.println(" write took: " + duration + " ms " + tags);
|
||||
}
|
||||
}
|
||||
@@ -382,7 +382,7 @@ public class DataStore implements AutoCloseable {
|
||||
final PartitionedTagsCacheKey cacheKey = new PartitionedTagsCacheKey(tags, partitionId);
|
||||
final PdbWriter result = writerCache.putIfAbsent(cacheKey, t -> getWriterInternal(partitionId, tags));
|
||||
final double duration = (System.nanoTime() - start) / 1_000_000.0;
|
||||
if (duration > 1) {
|
||||
if (duration > 100) {
|
||||
System.out.println(" get Writer took: " + duration + " ms " + tags);
|
||||
}
|
||||
return result;
|
||||
@@ -403,7 +403,7 @@ public class DataStore implements AutoCloseable {
|
||||
final PdbFile pdbFile = new PdbFile(partitionId, doc.getRootBlockNumber(), tags);
|
||||
writer = new PdbWriter(pdbFile, diskStorage.getExisting(partitionId));
|
||||
final double duration = (System.nanoTime() - start) / 1_000_000.0;
|
||||
if (duration > 1) {
|
||||
if (duration > 100) {
|
||||
System.out.println(" init existing writer took: " + duration + " ms " + tags);
|
||||
}
|
||||
} catch (final RuntimeException e) {
|
||||
@@ -422,7 +422,7 @@ public class DataStore implements AutoCloseable {
|
||||
final PdbWriter result = new PdbWriter(pdbFile, diskStorage.getExisting(partitionId));
|
||||
|
||||
final double duration = (System.nanoTime() - start) / 1_000_000.0;
|
||||
if (duration > 1) {
|
||||
if (duration > 10) {
|
||||
METRICS_LOGGER_NEW_WRITER.info("newPdbWriter took {}ms tags: {}", duration, tags);
|
||||
}
|
||||
return result;
|
||||
|
||||
@@ -334,7 +334,7 @@ public class QueryCompletionIndex implements AutoCloseable {
|
||||
fieldIndex.putValue(partitionId, stringCompressor.getKeyAsString(tag), Empty.INSTANCE);
|
||||
}
|
||||
final double d = (System.nanoTime() - start) / 1_000_000.0;
|
||||
if (d > 1) {
|
||||
if (d > 10) {
|
||||
System.out.println(" addTags: " + d + " ms");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user