accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmil...@apache.org
Subject [3/3] accumulo git commit: ACCUMULO-4602 Improved RollWALPerformanceIT
Date Mon, 17 Jul 2017 13:54:35 GMT
ACCUMULO-4602 Improved RollWALPerformanceIT


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/87e5780d
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/87e5780d
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/87e5780d

Branch: refs/heads/master
Commit: 87e5780d7f6a8ed018c77efb8415f5834ff4763d
Parents: 520d23d
Author: Mike Miller <mmiller@apache.org>
Authored: Fri Jul 14 16:58:29 2017 -0400
Committer: Mike Miller <mmiller@apache.org>
Committed: Fri Jul 14 16:58:29 2017 -0400

----------------------------------------------------------------------
 .../test/performance/RollWALPerformanceIT.java  | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/87e5780d/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java
b/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java
index 4feebd3..3c0d1af 100644
--- a/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/performance/RollWALPerformanceIT.java
@@ -58,6 +58,11 @@ public class RollWALPerformanceIT extends ConfigurableMacBase {
     cfg.useMiniDFS(true);
   }
 
+  @Override
+  protected int defaultTimeoutSeconds() {
+    return 5 * 60;
+  }
+
   private long ingest() throws Exception {
     final Connector c = getConnector();
     final String tableName = getUniqueNames(1)[0];
@@ -80,14 +85,14 @@ public class RollWALPerformanceIT extends ConfigurableMacBase {
     final Instance inst = c.getInstance();
 
     log.info("Starting ingest");
-    final long start = System.currentTimeMillis();
+    final long start = System.nanoTime();
     final String args[] = {"-i", inst.getInstanceName(), "-z", inst.getZooKeepers(), "-u",
"root", "-p", ROOT_PASSWORD, "--batchThreads", "2", "--table",
         tableName, "--num", Long.toString(50 * 1000), // 50K 100 byte entries
     };
 
     ContinuousIngest.main(args);
-    final long result = System.currentTimeMillis() - start;
-    log.debug(String.format("Finished in %,d ms", result));
+    final long result = System.nanoTime() - start;
+    log.debug(String.format("Finished in %,d ns", result));
     log.debug("Dropping table");
     c.tableOperations().delete(tableName);
     return result;
@@ -102,7 +107,8 @@ public class RollWALPerformanceIT extends ConfigurableMacBase {
     return totalTime / REPEAT;
   }
 
-  private void testWalPerformanceOnce() throws Exception {
+  @Test
+  public void testWalPerformanceOnce() throws Exception {
     // get time with a small WAL, which will cause many WAL roll-overs
     long avg1 = getAverage();
     // use a bigger WAL max size to eliminate WAL roll-overs
@@ -117,12 +123,6 @@ public class RollWALPerformanceIT extends ConfigurableMacBase {
     assertTrue(avg1 > avg2);
     double percent = (100. * avg1) / avg2;
     log.info(String.format("Percent of large log: %.2f%%", percent));
-    assertTrue(percent < 125.);
-  }
-
-  @Test(timeout = 20 * 60 * 1000)
-  public void testWalPerformance() throws Exception {
-    testWalPerformanceOnce();
   }
 
 }


Mime
View raw message