[
https://issues.apache.org/jira/browse/GEODE-9175?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17326070#comment-17326070
]
ASF GitHub Bot commented on GEODE-9175:
---------------------------------------
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]
> Clean up the terminal output and log progress for benchmarks
> ------------------------------------------------------------
>
> Key: GEODE-9175
> URL: https://issues.apache.org/jira/browse/GEODE-9175
> Project: Geode
> Issue Type: Improvement
> Components: benchmarks
> Reporter: Dan Smith
> Assignee: Dan Smith
> Priority: Major
> Labels: pull-request-available
>
> When developing a new benchmark with geode-benchmarks or testing out code
> changes interactively, it would be nice to for the geode-benchmarks to log
> the current throughput and latency numbers as the test is running, similar to
> the way YCSB does.
> This lets someone writing a new benchmark quickly eyeball if the performance
> has changed, or if their warm up time is too short or too long because the
> throughput fluctuates.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)