]> git.notmuchmail.org Git - notmuch/commitdiff
perf-test: add memory leak test for dump restore
authorDavid Bremner <bremner@debian.org>
Sun, 16 Dec 2012 18:14:13 +0000 (14:14 -0400)
committerDavid Bremner <bremner@debian.org>
Tue, 25 Dec 2012 12:49:24 +0000 (08:49 -0400)
In id:87vcc2q5n2.fsf@nikula.org, Jani points out a memory leak in the
current version of the sup restore code. Among other things, this test
is intended to verify a fix for that leak.

performance-test/M01-dump-restore [new file with mode: 0755]

diff --git a/performance-test/M01-dump-restore b/performance-test/M01-dump-restore
new file mode 100755 (executable)
index 0000000..be5894a
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+test_description='dump and restore'
+
+. ./perf-test-lib.sh
+
+memory_start
+
+memory_run 'load nmbug tags' 'notmuch restore --accumulate --input=corpus.tags/nmbug.sup-dump'
+memory_run 'dump *' 'notmuch dump --output=tags.sup'
+memory_run 'restore *' 'notmuch restore --input=tags.sup'
+memory_run 'dump --format=batch-tag *' 'notmuch dump --format=batch-tag --output=tags.bt'
+memory_run 'restore --format=batch-tag *' 'notmuch restore --format=batch-tag --input=tags.bt'
+
+memory_done