aboutsummaryrefslogtreecommitdiff
path: root/performance-test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2022-04-30 14:26:55 -0300
committerDavid Bremner <david@tethera.net>2022-04-30 14:26:55 -0300
commit97b6a43d46be19b73c2848b29184a93db06ddfe8 (patch)
tree1618e07c4b2c3514946d01dc83e92524a95aae18 /performance-test
parent4a4ea3234e6bd056aaa4b826765c089e8c884882 (diff)
parenta9b5f8959a20bbce774dec8a65a8b207555e52bd (diff)
Merge tag 'debian/0.36-1' into debian/bullseye-backports
notmuch release 0.36-1 for unstable (sid) [dgit] [dgit distro=debian no-split --quilt=linear]
Diffstat (limited to 'performance-test')
-rwxr-xr-xperformance-test/T06-emacs.sh21
-rw-r--r--performance-test/perf-test-lib.sh7
2 files changed, 28 insertions, 0 deletions
diff --git a/performance-test/T06-emacs.sh b/performance-test/T06-emacs.sh
new file mode 100755
index 00000000..66f0be58
--- /dev/null
+++ b/performance-test/T06-emacs.sh
@@ -0,0 +1,21 @@
+#!/usr/bin/env bash
+
+test_description='emacs operations'
+
+. $(dirname "$0")/perf-test-lib.sh || exit 1
+. $NOTMUCH_SRCDIR/test/test-lib-emacs.sh || exit 1
+
+test_require_emacs
+
+time_start
+
+print_emacs_header
+
+MSGS=$(notmuch search --output=messages "*" | shuf -n 50 | awk '{printf " \"%s\"",$1}')
+
+time_emacs "tag messages" \
+"(dolist (msg (list $MSGS))
+ (notmuch-tag msg (list \"+test\"))
+ (notmuch-tag msg (list \"-test\"))))"
+
+time_done
diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh
index 41b1ddfd..c34f8cd6 100644
--- a/performance-test/perf-test-lib.sh
+++ b/performance-test/perf-test-lib.sh
@@ -41,6 +41,8 @@ done
# Ensure NOTMUCH_SRCDIR and NOTMUCH_BUILDDIR are set.
. $(dirname "$0")/../test/export-dirs.sh || exit 1
+. "$NOTMUCH_SRCDIR/test/test-vars.sh" || exit 1
+
# Where to run the tests
TEST_DIRECTORY=$NOTMUCH_BUILDDIR/performance-test
@@ -208,6 +210,11 @@ print_header ()
printf "\t\t\tWall(s)\tUsr(s)\tSys(s)\tRes(K)\tIn/Out(512B)\n"
}
+print_emacs_header ()
+{
+ printf "\t\t\tWall(s)\tGCs\tGC time(s)\n"
+}
+
time_run ()
{
printf " %-22s" "$1"