aboutsummaryrefslogtreecommitdiffstats
path: root/container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java
diff options
context:
space:
mode:
Diffstat (limited to 'container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java')
-rw-r--r--container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java31
1 files changed, 31 insertions, 0 deletions
diff --git a/container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java b/container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java
index e85940278e3..bd14efb4dfa 100644
--- a/container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java
+++ b/container-search/src/test/java/com/yahoo/search/query/profile/config/test/XmlReadingTestCase.java
@@ -32,6 +32,37 @@ import static org.junit.Assert.fail;
public class XmlReadingTestCase {
@Test
+ @Ignore
+ public void testTmp() {
+ QueryProfileRegistry registry =
+ new QueryProfileXMLReader().read("/Users/bratseth/development/slingstone/massmedia_serving/homerun/src/main/application/search/flattened");
+ long startTime = System.currentTimeMillis();
+ System.out.println("Compiling ...");
+ CompiledQueryProfileRegistry cRegistry = registry.compile();
+ System.out.println("Done in " + (( System.currentTimeMillis() - startTime) / 1000) + " seconds");
+ System.out.println("");
+ CompiledQueryProfile cProfile = cRegistry.getComponent("megastream_unified");
+
+ Query q = new Query("?debug=true&clientId=default&langReg=en-US&format=xml&tracelevel=4&" +
+ "trace.timestamps=true&site=frontpage&streamBucketId=ga&configId=default&" +
+ "queryProfile=megastream_unified&lang=ENGLISH&region=US&", cProfile);
+ q.properties().listProperties();
+
+ // About 60 ms with tracelevel=4, a few ms with tracelevel=0
+ startTime = System.currentTimeMillis();
+ System.out.println("Creating query ...");
+ new Query("?debug=true&clientId=default&langReg=en-US&format=xml&tracelevel=0&" +
+ "trace.timestamps=true&site=frontpage&streamBucketId=ga&configId=default&" +
+ "queryProfile=megastream_unified&lang=ENGLISH&region=US&", cProfile);
+ System.out.println("Done in " + (System.currentTimeMillis() - startTime) + " ms");
+
+ startTime = System.currentTimeMillis();
+ System.out.println("listProperties() ...");
+ q.properties().listProperties().forEach((k, v) -> System.out.println(" " + k + "=" + v));
+ System.out.println("Done in " + (System.currentTimeMillis() - startTime) + " ms");
+ }
+
+ @Test
public void testInheritance() {
QueryProfileRegistry registry =
new QueryProfileXMLReader().read("src/test/java/com/yahoo/search/query/profile/config/test/inheritance");