diff options
author | David Bremner <bremner@debian.org> | 2012-12-16 08:33:17 -0400 |
---|---|---|
committer | David Bremner <bremner@debian.org> | 2012-12-25 08:49:24 -0400 |
commit | 098ef4af4d0a52a6b4daed5324a7c77f6c9108da (patch) | |
tree | 64bda0a95d08df65c86f2448d6d988e53bb9e3d6 /performance-test/Makefile.local | |
parent | 047cd7a595f760a23415b9e38d7136325f28b114 (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/Makefile.local')
-rw-r--r-- | performance-test/Makefile.local | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/performance-test/Makefile.local b/performance-test/Makefile.local index 57beb443..73aa963b 100644 --- a/performance-test/Makefile.local +++ b/performance-test/Makefile.local @@ -4,14 +4,24 @@ dir := performance-test include $(dir)/version.sh +TIME_TEST_SCRIPT := ${dir}/notmuch-time-test +MEMORY_TEST_SCRIPT := ${dir}/notmuch-memory-test + CORPUS_NAME := notmuch-email-corpus-$(PERFTEST_VERSION).tar.xz TXZFILE := ${dir}/download/${CORPUS_NAME} SIGFILE := ${TXZFILE}.asc -TEST_SCRIPT := ${dir}/notmuch-perf-test DEFAULT_URL := http://notmuchmail.org/releases/${CORPUS_NAME} +perf-test: time-test memory-test + time-test: setup-perf-test all - $(TEST_SCRIPT) $(OPTIONS) + @echo + $(TIME_TEST_SCRIPT) $(OPTIONS) + +memory-test: setup-perf-test all + @echo + $(MEMORY_TEST_SCRIPT) $(OPTIONS) + .PHONY: download-corpus setup-perf-test @@ -29,4 +39,4 @@ $(TXZFILE): download-corpus: wget -O ${TXZFILE} ${DEFAULT_URL} -CLEAN := $(CLEAN) $(dir)/tmp.* $(dir)/corpus $(dir)/notmuch.cache.* +CLEAN := $(CLEAN) $(dir)/tmp.* $(dir)/log.* $(dir)/corpus $(dir)/notmuch.cache.* |