jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r1527998 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/util/TimingDocumentStoreWrapper.java
Date Tue, 01 Oct 2013 09:33:57 GMT
Author: thomasm
Date: Tue Oct  1 09:33:56 2013
New Revision: 1527998

URL: http://svn.apache.org/r1527998
Log:
OAK-641: Improved benchmark tooling - TimingDocumentWrappers: log queries depending on size
of result

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/util/TimingDocumentStoreWrapper.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/util/TimingDocumentStoreWrapper.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/util/TimingDocumentStoreWrapper.java?rev=1527998&r1=1527997&r2=1527998&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/util/TimingDocumentStoreWrapper.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/mongomk/util/TimingDocumentStoreWrapper.java
Tue Oct  1 09:33:56 2013
@@ -124,7 +124,13 @@ public class TimingDocumentStoreWrapper 
         try {
             long start = now();
             List<T> result = base.query(collection, fromKey, toKey, limit);
-            updateAndLogTimes("query", start, 0, size(result));
+            if (result.size() == 0) {
+                updateAndLogTimes("query, result=0", start, 0, size(result));
+            } else if (result.size() == 1) {
+                updateAndLogTimes("query, result=1", start, 0, size(result));
+            } else {
+                updateAndLogTimes("query, result>1", start, 0, size(result));
+            }
             if (logCommonCall()) {
                 logCommonCall(start, "query " + collection + " " + fromKey + " " + toKey
+ " " + limit);
             }



Mime
View raw message