notmuch/performance-test/M00-new
David Bremner 098ef4af4d 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.
2012-12-25 08:49:24 -04:00

15 lines
269 B
Bash
Executable file

#!/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