Skip to content
Snippets Groups Projects
Commit 3e3d401b authored by Stanley Feng's avatar Stanley Feng
Browse files

[core] Incorporate CR feedback

- Move the doc (code comment) to workload_template
- Minor changes in propery parsing logic and log to System.Err;

[core] Incoporate CR comment

Missed one comment before.
parent d4ff9ec7
No related branches found
No related tags found
No related merge requests found
...@@ -35,14 +35,6 @@ public class DBWrapper extends DB ...@@ -35,14 +35,6 @@ public class DBWrapper extends DB
DB _db; DB _db;
Measurements _measurements; Measurements _measurements;
// By default we don't track latency numbers for specific error status code.
// We just report latency of all failed operation under one measurement name
// such as [READ-FAILED]. But optionally, user can configure to have either:
// 1) Record and report latency for each and every error status code by
// setting reportLatencyForEachError to true, or
// 2) Record and report latency for a select set of error status codes by
// providing a CSV list of Status codes via the "latencytrackederrors"
// property.
boolean reportLatencyForEachError = false; boolean reportLatencyForEachError = false;
HashSet<String> latencyTrackedErrors = new HashSet<String>(); HashSet<String> latencyTrackedErrors = new HashSet<String>();
...@@ -79,14 +71,16 @@ public class DBWrapper extends DB ...@@ -79,14 +71,16 @@ public class DBWrapper extends DB
this.reportLatencyForEachError = Boolean.parseBoolean(getProperties(). this.reportLatencyForEachError = Boolean.parseBoolean(getProperties().
getProperty("reportlatencyforeacherror", "false")); getProperty("reportlatencyforeacherror", "false"));
String latencyTrackedErrors = getProperties().getProperty( if (!reportLatencyForEachError) {
"latencytrackederrors", null); String latencyTrackedErrors = getProperties().getProperty(
if (latencyTrackedErrors != null) { "latencytrackederrors", null);
this.latencyTrackedErrors = new HashSet<String>(Arrays.asList( if (latencyTrackedErrors != null) {
latencyTrackedErrors.split(","))); this.latencyTrackedErrors = new HashSet<String>(Arrays.asList(
latencyTrackedErrors.split(",")));
}
} }
System.out.println("DBWrapper: report latency for each error is " + System.err.println("DBWrapper: report latency for each error is " +
this.reportLatencyForEachError + " and specific error codes to track" + this.reportLatencyForEachError + " and specific error codes to track" +
" for latency are: " + this.latencyTrackedErrors.toString()); " for latency are: " + this.latencyTrackedErrors.toString());
} }
......
...@@ -138,3 +138,21 @@ histogram.buckets=1000 ...@@ -138,3 +138,21 @@ histogram.buckets=1000
# Granularity for time series (in milliseconds) # Granularity for time series (in milliseconds)
timeseries.granularity=1000 timeseries.granularity=1000
# Latency reporting.
#
# YCSB records latency of failed operations separately from successful ones.
# Latency of all OK operations will be reported under their operation name,
# such as [READ], [UPDATE], etc.
#
# For failed operations:
# By default we don't track latency numbers of specific error status.
# We just report latency of all failed operation under one measurement name
# such as [READ-FAILED]. But optionally, user can configure to have either:
# 1. Record and report latency for each and every error status code by
# setting reportLatencyForEachError to true, or
# 2. Record and report latency for a select set of error status codes by
# providing a CSV list of Status codes via the "latencytrackederrors"
# property.
# reportlatencyforeacherror=false
# latencytrackederrors="<comma separated strings of error codes>"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment