pivotal-jbarrett commented on a change in pull request #147:
URL: https://github.com/apache/geode-benchmarks/pull/147#discussion_r616985335
##########
File path:
harness/src/main/java/org/apache/geode/perftest/yardstick/YardstickTask.java
##########
@@ -107,6 +112,35 @@ public String defaultDescription() {
runner.runBenchmark();
- testDoneProbe.await();
+ Histogram lastHistogram = hdrHistogramProbe.getHistogram();
+ while (!testDoneProbe.await(10, TimeUnit.SECONDS)) {
+ boolean warmupFinished = hdrHistogramProbe.isWarmupFinished();
+ // Create a histogram for the previous 10 second window
+ Histogram histogram = hdrHistogramProbe.getHistogram();
+ Histogram currentHistogram = histogram.copy();
+ if (histogram.getStartTimeStamp() == lastHistogram.getStartTimeStamp()) {
+ currentHistogram.subtract(lastHistogram);
+ currentHistogram.setStartTimeStamp(lastHistogram.getEndTimeStamp());
+ }
+
+ String prefix = warmupFinished ? "WORK" : "WARMUP";
+
+ // Log the histogram
+ logProgress(context, prefix, currentHistogram);
+
+ // Capture the current histogram
+ lastHistogram = histogram;
+ }
+ logProgress(context, "TOTAL", hdrHistogramProbe.getHistogram());
Review comment:
Why don't tasks just invoke the logger directly? What is purpose of
abstracting loging into this `logProgress` method on each task?
##########
File path:
harness/src/main/java/org/apache/geode/perftest/yardstick/YardstickTask.java
##########
@@ -107,6 +112,35 @@ public String defaultDescription() {
runner.runBenchmark();
- testDoneProbe.await();
+ Histogram lastHistogram = hdrHistogramProbe.getHistogram();
+ while (!testDoneProbe.await(10, TimeUnit.SECONDS)) {
Review comment:
I worry abut the performance impact of calculating the histogram every
10s for logging purposes. This will effectively steal a CPU every 10s to crunch
some numbers without the framework accounting for it. if work and measurement
was paused for each cycle that would be ok.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]