aboutsummaryrefslogtreecommitdiff
path: root/performance-test
diff options
context:
space:
mode:
authorDavid Bremner <david@tethera.net>2022-02-12 16:27:36 -0400
committerDavid Bremner <david@tethera.net>2022-02-25 08:38:21 -0400
commita70c93515b8a18941993dae0572d04466b1dc9f3 (patch)
tree5a9d5f512c3d4a5616b8e882a9efb215ce3cab54 /performance-test
parentb21fa0e43371b8281b9aa8ea532088800bb37712 (diff)
perf-test: emacs tagging
Time tag operations, to see if it is worthwhile keeping both the batch and the non-batch calls to notmuch tag.
Diffstat (limited to 'performance-test')
-rwxr-xr-xperformance-test/T06-emacs.sh21
1 files changed, 21 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