incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cr...@apache.org
Subject [11/50] [abbrv] git commit: Adding a new test (disabled for now), that will test the performance of deep paging.
Date Sun, 18 May 2014 21:41:46 GMT
Adding a new test (disabled for now), that will test the performance of deep paging.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/b5eb4795
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/b5eb4795
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/b5eb4795

Branch: refs/heads/console-v2
Commit: b5eb4795d18d80c58fe25e863564548063b16921
Parents: b615571
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Mon Apr 7 19:27:23 2014 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Mon Apr 7 19:27:23 2014 -0400

----------------------------------------------------------------------
 .../org/apache/blur/thrift/BlurClusterTest.java | 38 ++++++++++++++++++++
 1 file changed, 38 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/b5eb4795/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java
----------------------------------------------------------------------
diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java
index 11fd830..cbbf548 100644
--- a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java
+++ b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java
@@ -325,6 +325,44 @@ public class BlurClusterTest {
 
   }
 
+//  @Test
+  public void testQueryWithSelectorForDeepPagingPerformance() throws BlurException, TException,
IOException,
+      InterruptedException {
+    final String tableName = "testQueryWithSelectorForDeepPagingPerformance";
+    createTable(tableName);
+    int passes = 10;
+    for (int i = 1; i <= passes; i++) {
+      loadTable(tableName, i);
+    }
+    Iface client = getClient();
+    BlurQuery blurQueryRow = new BlurQuery();
+    Query queryRow = new Query();
+    queryRow.setQuery("test.test:value");
+    blurQueryRow.setQuery(queryRow);
+    blurQueryRow.setUseCacheIfPresent(false);
+    blurQueryRow.setCacheResult(false);
+    blurQueryRow.setSelector(new Selector());
+
+    long start = System.nanoTime();
+    int position = 0;
+    do {
+      blurQueryRow.setStart(position);
+      long s = System.nanoTime();
+      BlurResults resultsRow = client.query(tableName, blurQueryRow);
+      long e = System.nanoTime();
+      System.out.println("RUNNING QUERY.... starting at [" + position + "] took [" + (e -
s) / 1000000.0 + " ms]");
+      // assertRowResults(resultsRow);
+      assertEquals(numberOfDocs * passes, resultsRow.getTotalResults());
+
+      for (BlurResult blurResult : resultsRow.getResults()) {
+        System.out.println(blurResult);
+        position++;
+      }
+    } while (position < numberOfDocs * passes);
+    long end = System.nanoTime();
+    System.out.println((end - start) / 1000000.0);
+  }
+
   @Test
   public void testQueryWithFacets() throws BlurException, TException, IOException, InterruptedException
{
     final String tableName = "testQueryWithFacets";


Mime
View raw message