You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/07/25 16:20:10 UTC

[GitHub] [accumulo-testing] Manno15 commented on a change in pull request #105: Clean up and Minor Changes to ConditionalMutationsPT

Manno15 commented on a change in pull request #105: Clean up and Minor Changes to ConditionalMutationsPT
URL: https://github.com/apache/accumulo-testing/pull/105#discussion_r307385906
 
 

 ##########
 File path: src/main/java/org/apache/accumulo/testing/performance/tests/ConditionalMutationsPT.java
 ##########
 @@ -263,53 +231,41 @@ private static void runRandomizeBatchScanAndWriteTest(Environment env, String ta
     BatchWriter bw = env.getClient().createBatchWriter(tableName, new BatchWriterConfig());
     BatchScanner bs = env.getClient().createBatchScanner(tableName, Authorizations.EMPTY, 1);
 
-    boolean randomize = true;
-
-    randomizeBatchWriteAndScanTime(bw, bs, null, "0", reportBuilder, randomize);
+    randomizeBatchWriteAndScanTime(bw, bs, null);
 
     double rateSum = 0;
 
     for (int i = 1; i < 20; i++) {
-      rateSum += randomizeBatchWriteAndScanTime(bw, bs, (long) i, ((Integer) i).toString(),
-          reportBuilder, randomize);
+      rateSum += randomizeBatchWriteAndScanTime(bw, bs, (long) i);
     }
 
-    reportBuilder.result("avgRate", new Double(new DecimalFormat("#0.00").format(rateSum / 20)),
-        "RandomizeBatchScanAndWriteTest:  average rate (in seconds) to write and scan sequence 1-19");
-
-    // System.out.printf("rate avg : %6.2f \n", rateSum / 20);
-    // System.out.println("Flushing");
+    reportBuilder.result("avgRate: 1-19",
+        new Double(new DecimalFormat("#0.00").format(rateSum / 20)),
+        "RandomizeBatchScanAndWriteTest: average rate (in seconds) to write and scan sequence 1-19");
 
     env.getClient().tableOperations().flush(tableName, null, null, true);
 
     rateSum = 0;
     for (int i = 20; i < 40; i++) {
-      rateSum += randomizeBatchWriteAndScanTime(bw, bs, (long) i, ((Integer) i).toString(),
-          reportBuilder, randomize);
+      rateSum += randomizeBatchWriteAndScanTime(bw, bs, (long) i);
     }
 
-    reportBuilder.result("avgRate", new Double(new DecimalFormat("#0.00").format(rateSum / 20)),
-        "RandomizeBatchScanAndWriteTest:  average rate (in seconds) to write and scan sequence 20-39 post flush");
-
-    // System.out.printf("rate avg : %6.2f \n", rateSum / 20);
+    reportBuilder.result("avgRate: 20-39",
+        new Double(new DecimalFormat("#0.00").format(rateSum / 20)),
+        "RandomizeBatchScanAndWriteTest: average rate (in seconds) to write and scan sequence 20-39 post flush");
   }
 
-  private static double randomizeBatchWriteAndScanTime(BatchWriter bw, BatchScanner bs, Long seq,
-      String testRun, Report.Builder reportBuilder, boolean randomize) throws Exception {
+  private static double randomizeBatchWriteAndScanTime(BatchWriter bw, BatchScanner bs, Long seq)
 
 Review comment:
   I agree, I am not fully sure on the initial reasoning behind using `Long`. I made the change and replaced the null's with 0 to keep her code logic mostly the same.  

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services