You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by GitBox <gi...@apache.org> on 2022/10/27 07:47:14 UTC

[GitHub] [jackrabbit-oak] fabriziofortino commented on a diff in pull request #738: OAK-9977 The query recorder lists the same query many times

fabriziofortino commented on code in PR #738:
URL: https://github.com/apache/jackrabbit-oak/pull/738#discussion_r1006508286


##########
oak-core/src/test/java/org/apache/jackrabbit/oak/query/stats/QueryRecorderTest.java:
##########
@@ -18,12 +18,48 @@
 
 import static org.junit.Assert.assertEquals;
 
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.TreeSet;
+
 import org.junit.Test;
 
+import com.google.common.io.LineReader;
+
 public class QueryRecorderTest {
     
+    public static void main(String... args) throws IOException {
+        LineReader r = new LineReader(new FileReader("/Users/mueller/temp/queryRecorder.txt"));
+        TreeSet<String> set = new TreeSet<>();
+        while(true) {
+            String l = r.readLine();
+            if (l == null) {
+                break;
+            }
+            String s = QueryRecorder.simplify(l);
+            set.add(s);
+        }
+        for (String x : set) {
+            System.out.println(x);
+        }
+    }
+

Review Comment:
   is this a leftover? Should we remove it?



-- 
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.

To unsubscribe, e-mail: dev-unsubscribe@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org