test_perf.sh fetches 100 records from yaz-ztest
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 3 Jul 2014 13:21:39 +0000 (15:21 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 3 Jul 2014 13:22:10 +0000 (15:22 +0200)
Part of PAZ-944

test/Makefile.am
test/test_perf.sh [new file with mode: 0755]
test/test_perf.urls [new file with mode: 0644]
test/test_perf_1.res [new file with mode: 0644]
test/test_perf_2.res [new file with mode: 0644]
test/test_perf_3.res [new file with mode: 0644]
test/test_perf_4.res [new file with mode: 0644]
test/test_perf_5.res [new file with mode: 0644]

index f33c0b0..8976541 100644 (file)
@@ -4,7 +4,7 @@
 solr_tests = test_solr.sh test_termlist_block.sh test_limit_limitmap.sh test_sort.sh
 check_SCRIPTS = test_http.sh test_icu.sh test_post.sh \
  test_settings.sh test_turbomarcxml.sh test_facets.sh \
- test_url.sh test_filter.sh test_sru.sh \
+ test_url.sh test_filter.sh test_sru.sh test_perf.sh \
  $(solr_tests)
 
 EXTRA_DIST = run_pazpar2.sh marc21_test.xsl tmarc.xsl solr-pz2.xsl \
@@ -34,6 +34,7 @@ EXTRA_DIST = run_pazpar2.sh marc21_test.xsl tmarc.xsl solr-pz2.xsl \
        ztest_localhost_settings.xml test_termlist_block_settings_2.xml \
        test_facets_settings_1.xml test_facets_settings_2.xml \
        test_sru.cfg sru_service.xml \
+       test_perf.cfg \
        $(check_SCRIPTS)
 
 TESTS = $(check_SCRIPTS)
diff --git a/test/test_perf.sh b/test/test_perf.sh
new file mode 100755 (executable)
index 0000000..bf0e59d
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+TEST=`basename $0 .sh`
+# srcdir might be set by make
+srcdir=${srcdir:-"."}
+
+exec ${srcdir}/run_pazpar2.sh --ztest --icu --perf $TEST
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation: 2
+# sh-basic-offset: 4
+# End:
diff --git a/test/test_perf.urls b/test/test_perf.urls
new file mode 100644 (file)
index 0000000..60a342c
--- /dev/null
@@ -0,0 +1,5 @@
+http://localhost:9763/search.pz2?command=init&clear=1
+ztest_localhost_settings.xml http://localhost:9763/search.pz2?session=1&command=settings
+http://localhost:9763/search.pz2?session=1&command=search&query=100+and+computer
+http://localhost:9763/search.pz2?session=1&command=show&block=1
+http://localhost:9763/search.pz2?session=1&command=termlist
diff --git a/test/test_perf_1.res b/test/test_perf_1.res
new file mode 100644 (file)
index 0000000..c09ee34
--- /dev/null
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<init><status>OK</status><session>1</session><protocol>1</protocol><keepAlive>50000</keepAlive>
+</init>
\ No newline at end of file
diff --git a/test/test_perf_2.res b/test/test_perf_2.res
new file mode 100644 (file)
index 0000000..42534e3
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<settings><status>OK</status></settings>
\ No newline at end of file
diff --git a/test/test_perf_3.res b/test/test_perf_3.res
new file mode 100644 (file)
index 0000000..ab63fe6
--- /dev/null
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<search><status>OK</status></search>
\ No newline at end of file
diff --git a/test/test_perf_4.res b/test/test_perf_4.res
new file mode 100644 (file)
index 0000000..dd96735
--- /dev/null
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<show><status>OK</status>
+<activeclients>1</activeclients>
+<merged>39</merged>
+<total>100</total>
+<start>0</start>
+<num>20</num>
+<hit>
+ <md-title>Internet world</md-title>
+ <md-date>1992</md-date>
+ <md-description>Title from caption</md-description>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="2093092631">
+  <md-title>Internet world</md-title>
+  <md-date>1992</md-date>
+  <md-description>Title from caption</md-description>
+ </location>
+ <count>1</count>
+ <relevance>152547</relevance>
+ <recid>content: title internet world</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack Collins</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="75373906">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack Collins</md-author>
+ </location>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="4195168235">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack Collins</md-author>
+ </location>
+ <count>2</count>
+ <relevance>91528</relevance>
+ <recid>content: title how to program a computer author jack collins</recid>
+</hit>
+<hit>
+ <md-title>The Computer Bible</md-title>
+ <md-date>1973-1980</md-date>
+ <md-description>Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates</md-description>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="3844822301">
+  <md-title>The Computer Bible</md-title>
+  <md-date>1973-1980</md-date>
+  <md-description>Hebrew and Greek; introductions in English</md-description>
+  <md-description>Vols. 2, 8: Missoula, Mont. : Published by Scholars Press for Biblical Research Associates</md-description>
+ </location>
+ <count>1</count>
+ <relevance>76273</relevance>
+ <recid>content: title the computer bible</recid>
+</hit>
+<hit>
+ <md-title>Computer science &amp; technology</md-title>
+ <md-title-remainder>proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976</md-title-remainder>
+ <md-date>1977</md-date>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="3319303400">
+  <md-title>Computer science &amp; technology</md-title>
+  <md-title-remainder>proceedings of a workshop held at the National Bureau of Standards, Gaithersburg, MD, June 3-4, 1976</md-title-remainder>
+  <md-date>1977</md-date>
+ </location>
+ <count>1</count>
+ <relevance>57205</relevance>
+ <recid>content: title computer science technology</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C24</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="341362961">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C24</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c24</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C25</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="166189994">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C25</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c25</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C26</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="4285984323">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C26</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c26</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C27</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="4110811356">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C27</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c27</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C28</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="3935638389">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C28</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c28</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C29</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="3760465422">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C29</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c29</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C30</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="3585292455">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C30</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c30</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C31</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="3410119488">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C31</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c31</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C32</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="3234946521">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C32</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c32</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C33</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="3059773554">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C33</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c33</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C34</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="2884600587">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C34</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c34</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C35</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="2709427620">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C35</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c35</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C36</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="2534254653">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C36</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c36</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C37</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="2359081686">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C37</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c37</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C38</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="2183908719">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C38</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c38</recid>
+</hit>
+<hit>
+ <md-title>How to program a computer</md-title>
+ <md-author>Jack C39</md-author>
+ <location id="localhost:9999/db1"
+    name="db1" checksum="2008735752">
+  <md-title>How to program a computer</md-title>
+  <md-author>Jack C39</md-author>
+ </location>
+ <count>1</count>
+ <relevance>45764</relevance>
+ <recid>content: title how to program a computer author jack c39</recid>
+</hit>
+</show>
\ No newline at end of file
diff --git a/test/test_perf_5.res b/test/test_perf_5.res
new file mode 100644 (file)
index 0000000..bad0324
--- /dev/null
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<termlist><activeclients>0</activeclients>
+<list name="author">
+<term><name>Jack Collins</name><frequency>2</frequency></term>
+<term><name>Adam, James</name><frequency>1</frequency></term>
+<term><name>Carter, Bill</name><frequency>1</frequency></term>
+<term><name>Englund, Carl R</name><frequency>1</frequency></term>
+<term><name>Jack C100</name><frequency>1</frequency></term>
+<term><name>Jack C24</name><frequency>1</frequency></term>
+<term><name>Jack C25</name><frequency>1</frequency></term>
+<term><name>Jack C26</name><frequency>1</frequency></term>
+<term><name>Jack C27</name><frequency>1</frequency></term>
+<term><name>Jack C28</name><frequency>1</frequency></term>
+<term><name>Jack C29</name><frequency>1</frequency></term>
+<term><name>Jack C30</name><frequency>1</frequency></term>
+<term><name>Jack C31</name><frequency>1</frequency></term>
+<term><name>Jack C32</name><frequency>1</frequency></term>
+<term><name>Jack C33</name><frequency>1</frequency></term>
+</list>
+<list name="date">
+<term><name>1977</name><frequency>3</frequency></term>
+<term><name>1971</name><frequency>2</frequency></term>
+<term><name>1974</name><frequency>2</frequency></term>
+<term><name>1980</name><frequency>2</frequency></term>
+<term><name>1987</name><frequency>2</frequency></term>
+<term><name>1991</name><frequency>2</frequency></term>
+<term><name>1993</name><frequency>2</frequency></term>
+<term><name>1968</name><frequency>1</frequency></term>
+<term><name>1972</name><frequency>1</frequency></term>
+<term><name>1973</name><frequency>1</frequency></term>
+<term><name>1984</name><frequency>1</frequency></term>
+<term><name>1986</name><frequency>1</frequency></term>
+<term><name>1992</name><frequency>1</frequency></term>
+</list>
+<list name="subject">
+<term><name>Bible</name><frequency>5</frequency></term>
+<term><name>Internet (Computer network)</name><frequency>2</frequency></term>
+<term><name>United States</name><frequency>2</frequency></term>
+<term><name>Bible. O.T</name><frequency>1</frequency></term>
+<term><name>Bible. O.T. Deuteronomy</name><frequency>1</frequency></term>
+<term><name>Cartography</name><frequency>1</frequency></term>
+<term><name>Community colleges</name><frequency>1</frequency></term>
+<term><name>Computer Systems</name><frequency>1</frequency></term>
+<term><name>Computer networks</name><frequency>1</frequency></term>
+<term><name>Computers</name><frequency>1</frequency></term>
+<term><name>Demonstration centers in education</name><frequency>1</frequency></term>
+<term><name>Dropouts</name><frequency>1</frequency></term>
+<term><name>Educational innovations</name><frequency>1</frequency></term>
+<term><name>Educational technology</name><frequency>1</frequency></term>
+<term><name>FEDLINK (Network)</name><frequency>1</frequency></term>
+</list>
+<list name="xtargets">
+<term>
+<id>localhost:9999/db1</id>
+<name>db1</name>
+<frequency>100</frequency>
+<state>Client_Idle</state>
+<diagnostic>0</diagnostic>
+</term>
+</list>
+</termlist>
\ No newline at end of file