diff --git a/core/src/main/java/site/ycsb/DBWrapper.java b/core/src/main/java/site/ycsb/DBWrapper.java index ed6a7cae..60e96c20 100644 --- a/core/src/main/java/site/ycsb/DBWrapper.java +++ b/core/src/main/java/site/ycsb/DBWrapper.java @@ -18,11 +18,13 @@ package site.ycsb; import java.util.Map; + import site.ycsb.measurements.Measurements; import org.apache.htrace.core.TraceScope; import org.apache.htrace.core.Tracer; import java.util.*; +import java.util.concurrent.atomic.AtomicBoolean; /** * Wrapper around a "real" DB that measures latencies and counts return codes. @@ -41,6 +43,8 @@ public class DBWrapper extends DB { private static final String LATENCY_TRACKED_ERRORS_PROPERTY = "latencytrackederrors"; + private static final AtomicBoolean LOG_REPORT_CONFIG = new AtomicBoolean(false); + private final String scopeStringCleanup; private final String scopeStringDelete; private final String scopeStringInit; @@ -97,9 +101,11 @@ public class DBWrapper extends DB { } } - System.err.println("DBWrapper: report latency for each error is " + - this.reportLatencyForEachError + " and specific error codes to track" + - " for latency are: " + this.latencyTrackedErrors.toString()); + if (LOG_REPORT_CONFIG.compareAndSet(false, true)) { + System.err.println("DBWrapper: report latency for each error is " + + this.reportLatencyForEachError + " and specific error codes to track" + + " for latency are: " + this.latencyTrackedErrors.toString()); + } } }