]> git.notmuchmail.org Git - notmuch/commitdiff
perf-test: add simple test for thread subqueries
authorDavid Bremner <david@tethera.net>
Sat, 13 Jan 2018 12:46:21 +0000 (08:46 -0400)
committerDavid Bremner <david@tethera.net>
Mon, 7 May 2018 11:42:53 +0000 (08:42 -0300)
This is not a particularly sensible query, but thread:{date:2010} is a
good way to generate fairly large intermediate queries.

performance-test/T04-thread-subquery.sh [new file with mode: 0755]

diff --git a/performance-test/T04-thread-subquery.sh b/performance-test/T04-thread-subquery.sh
new file mode 100755 (executable)
index 0000000..665d5a6
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+test_description='thread subqueries'
+
+. $(dirname "$0")/perf-test-lib.sh || exit 1
+
+time_start
+
+time_run "search thread:{} ..." "notmuch search thread:{date:2010} and thread:{from:linus}"
+time_run "search thread:{} ..." "notmuch search thread:{date:2010} and thread:{from:linus}"
+time_run "search thread:{} ..." "notmuch search thread:{date:2010} and thread:{from:linus}"
+
+time_done