perf-test: add memory test for notmuch-insert
authorDavid Bremner <david@tethera.net>
Fri, 18 Aug 2017 23:50:06 +0000 (20:50 -0300)
committerDavid Bremner <david@tethera.net>
Sun, 20 Aug 2017 11:48:43 +0000 (08:48 -0300)
In the future it might be worthwhile selecting corpus messages to
insert, but that seems a bit overcomplicated for now

performance-test/M06-insert.sh [new file with mode: 0755]

diff --git a/performance-test/M06-insert.sh b/performance-test/M06-insert.sh
new file mode 100755 (executable)
index 0000000..9fcc2a0
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+test_description='search'
+
+. ./perf-test-lib.sh || exit 1
+
+memory_start
+
+mkdir -p "$MAIL_DIR"/{cur,new,tmp}
+
+for count in {1..20}; do
+    generate_message "[file]=\"insert-$count\"" "[dir]='tmp/'"
+    memory_run "insert $count" "notmuch insert < $gen_msg_filename"
+done
+
+memory_done