From 098ef4af4d0a52a6b4daed5324a7c77f6c9108da Mon Sep 17 00:00:00 2001 From: David Bremner Date: Sun, 16 Dec 2012 08:33:17 -0400 Subject: 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. --- performance-test/M00-new | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 performance-test/M00-new (limited to 'performance-test/M00-new') 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 -- cgit v1.2.3