aboutsummaryrefslogtreecommitdiffhomepage
path: root/performance-test/M00-new
diff options
context:
space:
mode:
authorGravatar David Bremner <bremner@debian.org>2012-12-16 08:33:17 -0400
committerGravatar David Bremner <bremner@debian.org>2012-12-25 08:49:24 -0400
commit098ef4af4d0a52a6b4daed5324a7c77f6c9108da (patch)
tree64bda0a95d08df65c86f2448d6d988e53bb9e3d6 /performance-test/M00-new
parent047cd7a595f760a23415b9e38d7136325f28b114 (diff)
perf-test: initial version of memory test infrastructure.
The idea is run some code under valgrind --leak-check=full and report a summary, leaving the user to peruse the log file if they want. We go to some lengths to preserve the log files from accidental overwriting; the full corpus takes about 3 hours to run under valgrind on my machine. The naming of the log directories may be slightly controversial; in the unlikely event of two runs in less than a second, the log will be overwritten. A previous version with mktemp+timestamp was dismissed as overkill; just mktemp alone does not sort nicely. One new test is included, to check notmuch new for memory leaks.
Diffstat (limited to 'performance-test/M00-new')
-rwxr-xr-xperformance-test/M00-new15
1 files changed, 15 insertions, 0 deletions
diff --git a/performance-test/M00-new b/performance-test/M00-new
new file mode 100755
index 00000000..99c3f520
--- /dev/null
+++ b/performance-test/M00-new
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+test_description='notmuch new'
+
+. ./perf-test-lib.sh
+
+# ensure initial 'notmuch new' is run by memory_start
+uncache_database
+
+memory_start
+
+# run 'notmuch new' a second time, to test different code paths
+memory_run "notmuch new" "notmuch new"
+
+memory_done