geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From n...@apache.org
Subject [geode-benchmarks] branch develop updated: GEODE-6299: Create hgrm files from hlog (#48)
Date Fri, 18 Jan 2019 22:31:30 GMT
This is an automated email from the ASF dual-hosted git repository.

nnag pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/geode-benchmarks.git


The following commit(s) were added to refs/heads/develop by this push:
     new 5bd36da  GEODE-6299: Create hgrm files from hlog (#48)
5bd36da is described below

commit 5bd36daa1efd32488fb25c71675fbe73e57e4232
Author: Nabarun Nag <nabarunnag@users.noreply.github.com>
AuthorDate: Fri Jan 18 14:31:26 2019 -0800

    GEODE-6299: Create hgrm files from hlog (#48)
    
            * Create hgrm files from hlog file created by hdrhistogram.
    	* This new file is human readable and can be used by plotters to create graphs.
---
 .../perftest/yardstick/hdrhistogram/HdrHistogramWriter.java    | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramWriter.java
b/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramWriter.java
index 7d1d346..6233783 100644
--- a/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramWriter.java
+++ b/harness/src/main/java/org/apache/geode/perftest/yardstick/hdrhistogram/HdrHistogramWriter.java
@@ -20,15 +20,20 @@ import java.io.UncheckedIOException;
 import java.util.function.Consumer;
 
 import org.HdrHistogram.Histogram;
+import org.HdrHistogram.HistogramLogProcessor;
 import org.HdrHistogram.HistogramLogWriter;
 
 public class HdrHistogramWriter implements Consumer<Histogram> {
 
   public static final String FILE_NAME = "latency.hlog";
+  public static final String FILE_NAME_HDR = "latency_hdr";
+
   private final File outputFile;
+  private final File outputHDRFile;
 
   public HdrHistogramWriter(File outputDir) {
     this.outputFile = new File(outputDir, FILE_NAME);
+    this.outputHDRFile = new File(outputDir, FILE_NAME_HDR);
   }
 
   @Override
@@ -38,9 +43,14 @@ public class HdrHistogramWriter implements Consumer<Histogram> {
       HistogramLogWriter writer = new HistogramLogWriter(outputFile);
       try {
         writer.outputIntervalHistogram(histogram);
+        writer.outputIntervalHistogram(histogram);
       } finally {
         writer.close();
       }
+      HistogramLogProcessor histogramLogProcessor =
+          new HistogramLogProcessor(new String[] {"-i", outputFile.getAbsolutePath(), "-o",
+              outputHDRFile.getAbsolutePath()});
+      histogramLogProcessor.run();
     } catch (FileNotFoundException e) {
       throw new UncheckedIOException(e);
     }


Mime
View raw message