Repository: cassandra Updated Branches: refs/heads/cassandra-3.9 8475f891c -> c1dcc9ce4 refs/heads/trunk de86ccf3a -> ab2f74404
Fix hdr logging for single operation workloads Patch by Nitsan Wakart; reviewed by tjake for CASSANDRA-12145 Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/c1dcc9ce Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/c1dcc9ce Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/c1dcc9ce Branch: refs/heads/cassandra-3.9 Commit: c1dcc9ce46f53dd89b80a08d363d5eacac1b9e23 Parents: 8475f89 Author: nitsanw <nits...@yahoo.com> Authored: Wed Jul 6 14:45:18 2016 +0200 Committer: T Jake Luciani <j...@apache.org> Committed: Fri Jul 8 10:38:40 2016 -0400 ---------------------------------------------------------------------- CHANGES.txt | 1 + .../src/org/apache/cassandra/stress/StressMetrics.java | 13 ++++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra/blob/c1dcc9ce/CHANGES.txt ---------------------------------------------------------------------- diff --git a/CHANGES.txt b/CHANGES.txt index 34e7587..b094b00 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.9 + * Fix hdr logging for single operation workloads (CASSANDRA-12145) * Fix SASI PREFIX search in CONTAINS mode with partial terms (CASSANDRA-12073) * Increase size of flushExecutor thread pool (CASSANDRA-12071) Merged from 3.0: http://git-wip-us.apache.org/repos/asf/cassandra/blob/c1dcc9ce/tools/stress/src/org/apache/cassandra/stress/StressMetrics.java ---------------------------------------------------------------------- diff --git a/tools/stress/src/org/apache/cassandra/stress/StressMetrics.java b/tools/stress/src/org/apache/cassandra/stress/StressMetrics.java index 668518c..86e9a7a 100644 --- a/tools/stress/src/org/apache/cassandra/stress/StressMetrics.java +++ b/tools/stress/src/org/apache/cassandra/stress/StressMetrics.java @@ -191,15 +191,18 @@ public class StressMetrics rowRateUncertainty.update(current.adjustedRowRate()); if (current.operationCount() != 0) { - if (result.intervals.intervals().size() > 1) + // if there's a single operation we only print the total + final boolean logPerOpSummaryLine = result.intervals.intervals().size() > 1; + + for (Map.Entry<String, TimingInterval> type : result.intervals.intervals().entrySet()) { - for (Map.Entry<String, TimingInterval> type : result.intervals.intervals().entrySet()) + final String opName = type.getKey(); + final TimingInterval opInterval = type.getValue(); + if (logPerOpSummaryLine) { - final String opName = type.getKey(); - final TimingInterval opInterval = type.getValue(); printRow("", opName, opInterval, timing.getHistory().get(type.getKey()), result.extra, rowRateUncertainty, output); - logHistograms(opName, opInterval); } + logHistograms(opName, opInterval); } printRow("", "total", current, history, result.extra, rowRateUncertainty, output);