--- /dev/null
+Return-Path: <amdragon@mit.edu>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by olra.theworths.org (Postfix) with ESMTP id A097A431FAE\r
+ for <notmuch@notmuchmail.org>; Tue, 4 Dec 2012 21:03:04 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+ by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id xjEoeRQIty46 for <notmuch@notmuchmail.org>;\r
+ Tue, 4 Dec 2012 21:03:00 -0800 (PST)\r
+Received: from dmz-mailsec-scanner-3.mit.edu (DMZ-MAILSEC-SCANNER-3.MIT.EDU\r
+ [18.9.25.14])\r
+ by olra.theworths.org (Postfix) with ESMTP id 0BB0F431FB6\r
+ for <notmuch@notmuchmail.org>; Tue, 4 Dec 2012 21:02:59 -0800 (PST)\r
+X-AuditID: 1209190e-b7f516d0000008e4-98-50bed582bbeb\r
+Received: from mailhub-auth-2.mit.edu ( [18.7.62.36])\r
+ by dmz-mailsec-scanner-3.mit.edu (Symantec Messaging Gateway) with SMTP\r
+ id 4E.08.02276.285DEB05; Wed, 5 Dec 2012 00:02:58 -0500 (EST)\r
+Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103])\r
+ by mailhub-auth-2.mit.edu (8.13.8/8.9.2) with ESMTP id qB552v5C011663; \r
+ Wed, 5 Dec 2012 00:02:58 -0500\r
+Received: from awakening.csail.mit.edu (awakening.csail.mit.edu [18.26.4.91])\r
+ (authenticated bits=0)\r
+ (User authenticated as amdragon@ATHENA.MIT.EDU)\r
+ by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id qB552tIU020186\r
+ (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT);\r
+ Wed, 5 Dec 2012 00:02:57 -0500 (EST)\r
+Received: from amthrax by awakening.csail.mit.edu with local (Exim 4.80)\r
+ (envelope-from <amdragon@mit.edu>)\r
+ id 1Tg78J-0004ih-Mq; Wed, 05 Dec 2012 00:02:55 -0500\r
+From: Austin Clements <aclements@csail.mit.edu>\r
+To: david@tethera.net, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH 3/3] perf-test: add caching of xapian database.\r
+In-Reply-To: <1354583824-10520-3-git-send-email-david@tethera.net>\r
+References: <1354583824-10520-1-git-send-email-david@tethera.net>\r
+ <1354583824-10520-3-git-send-email-david@tethera.net>\r
+User-Agent: Notmuch/0.14+100~gcb9b0b0 (http://notmuchmail.org) Emacs/23.4.1\r
+ (i486-pc-linux-gnu)\r
+Date: Wed, 05 Dec 2012 00:02:55 -0500\r
+Message-ID: <87sj7lccqo.fsf@awakening.csail.mit.edu>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain; charset=us-ascii\r
+X-Brightmail-Tracker:\r
+ H4sIAAAAAAAAA+NgFmpkleLIzCtJLcpLzFFi42IRYrdT0W26ui/A4FCTjcXGZT+ZLW60djNa\r
+ XL85k9mB2eNX21xmj2erbjF7bDn0njmAOYrLJiU1J7MstUjfLoEro+PwNuaCe9IVj1cuY2lg\r
+ nCnWxcjJISFgIvH/xElWCFtM4sK99WxdjFwcQgL7GCUmftvDAuGsZ5T4M+UtM4RzgUni9tQ/\r
+ 7BDOEkaJ219aGEH62QT0JVasnQQ0i4NDREBPYuFWGZAws4CaxKQ1Z9hBbGEBZ4mnpxrZQUo4\r
+ BZwkFjTUgoSFBMoldnb+YQEJiwrES1xeqgASZhFQlbg3rYMNxOYFOnTjhu3MELagxMmZT1gg\r
+ pmtJ3Pj3kmkCo+AsJKlZSFILGJlWMcqm5Fbp5iZm5hSnJusWJyfm5aUW6Rrr5WaW6KWmlG5i\r
+ BIUupyTfDsavB5UOMQpwMCrx8Eoa7wsQYk0sK67MPcQoycGkJMrbdgQoxJeUn1KZkVicEV9U\r
+ mpNafIhRgoNZSYT3nx1QjjclsbIqtSgfJiXNwaIkznsl5aa/kEB6YklqdmpqQWoRTFaGg0NJ\r
+ gvfWFaBGwaLU9NSKtMycEoQ0EwcnyHAeoOGKV0GGFxck5hZnpkPkTzHqcvT+63rCKMSSl5+X\r
+ KiXO+x9kkABIUUZpHtwcWMp5xSgO9JYwLyfIKB5guoKb9ApoCRPQkhdCu0GWlCQipKQaGH1t\r
+ ZpQ+ERf4XLYtjW/i2p2KT6NrA7P19vTu+XKTRdlM7slq8ZmmLefs7gkcS3hhufuJlp2+zUuG\r
+ 9reHS43FdvRkSjWe8ZCbpvOodOf81XaBnQ8aq5drPr1q8+Wqqdnx94E83Zkv416st3Cw5JnZ\r
+ HnbSftH2oAOTWqfGulk+jr1xZraq1qln8UosxRmJhlrMRcWJAPmOwFsUAwAA\r
+Cc: David Bremner <bremner@debian.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 05 Dec 2012 05:03:04 -0000\r
+\r
+This seems like an odd way to do this. Timing the initial notmuch new\r
+seems like the goal of exactly one performance test and irrelevant to\r
+the others. What about splitting "basic" into two tests: an explicit\r
+notmuch new performance test and a separate test that does\r
+dump/restore/tag. The second test can always use a cached notmuch\r
+database (creating it if necessary). If you want to be really kind, the\r
+notmuch new performance test could save its result as the database cache\r
+if there isn't a database cache; then people don't have to build the\r
+database twice if they (or notmuch-perf-test) run the tests in the right\r
+order.\r
+\r
+On Mon, 03 Dec 2012, david@tethera.net wrote:\r
+> From: David Bremner <bremner@debian.org>\r
+>\r
+> The caching and uncaching seem to be necessarily manual, as timing the\r
+> initial notmuch new is one of our goals with this suite.\r
+> ---\r
+> performance-test/.gitignore | 1 +\r
+> performance-test/Makefile.local | 2 +-\r
+> performance-test/basic | 5 +++++\r
+> performance-test/perf-test-lib.sh | 18 ++++++++++++++++++\r
+> 4 files changed, 25 insertions(+), 1 deletion(-)\r
+>\r
+> diff --git a/performance-test/.gitignore b/performance-test/.gitignore\r
+> index 7e20f7c..779a115 100644\r
+> --- a/performance-test/.gitignore\r
+> +++ b/performance-test/.gitignore\r
+> @@ -1,2 +1,3 @@\r
+> tmp.*/\r
+> corpus.mail.*/\r
+> +notmuch.cache.*/\r
+> diff --git a/performance-test/Makefile.local b/performance-test/Makefile.local\r
+> index eb713d0..b136a88 100644\r
+> --- a/performance-test/Makefile.local\r
+> +++ b/performance-test/Makefile.local\r
+> @@ -29,4 +29,4 @@ $(TXZFILE):\r
+> download-corpus:\r
+> wget -O ${TXZFILE} ${DEFAULT_URL}\r
+> \r
+> -CLEAN := $(CLEAN) $(dir)/tmp.* $(dir)/corpus.mail.*\r
+> +CLEAN := $(CLEAN) $(dir)/tmp.* $(dir)/corpus.mail.* $(dir)/notmuch.cache.*\r
+> diff --git a/performance-test/basic b/performance-test/basic\r
+> index 9d015ee..41a7ff1 100755\r
+> --- a/performance-test/basic\r
+> +++ b/performance-test/basic\r
+> @@ -2,11 +2,16 @@\r
+> \r
+> . ./perf-test-lib.sh\r
+> \r
+> +uncache_database\r
+> +\r
+> add_email_corpus\r
+> \r
+> print_header\r
+> \r
+> time_run 'initial notmuch new' 'notmuch new'\r
+> +\r
+> +cache_database\r
+> +\r
+> time_run 'second notmuch new' 'notmuch new'\r
+> time_run 'dump *' 'notmuch dump > tags.out'\r
+> time_run 'restore *' 'notmuch restore < tags.out'\r
+> diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh\r
+> index 9fbf874..c9b131a 100644\r
+> --- a/performance-test/perf-test-lib.sh\r
+> +++ b/performance-test/perf-test-lib.sh\r
+> @@ -36,6 +36,8 @@ then\r
+> fi\r
+> \r
+> CORPUS_DIR=${TEST_DIRECTORY}/corpus.mail.$corpus_size\r
+> +DB_CACHE_DIR=${TEST_DIRECTORY}/notmuch.cache.$corpus_size\r
+> +\r
+> add_email_corpus ()\r
+> {\r
+> rm -rf ${MAIL_DIR}\r
+> @@ -69,9 +71,25 @@ add_email_corpus ()\r
+> printf "\n"\r
+> \r
+> fi\r
+> +\r
+> cp -lr $CORPUS_DIR $MAIL_DIR\r
+> +\r
+> + if [ -d $DB_CACHE_DIR ]; then\r
+> + cp -r $DB_CACHE_DIR ${MAIL_DIR}/.notmuch\r
+> + fi\r
+> }\r
+> \r
+> +cache_database () {\r
+> + if [ -d $MAIL_DIR/.notmuch ]; then\r
+> + cp -r $MAIL_DIR/.notmuch $DB_CACHE_DIR\r
+> + else\r
+> + echo "Warning: No database found to cache"\r
+> + fi\r
+> +}\r
+> +\r
+> +uncache_database () {\r
+> + rm -rf $DB_CACHE_DIR\r
+> +}\r
+> \r
+> print_header () {\r
+> printf "[v%4s] Wall(s)\tUsr(s)\tSys(s)\tRes(K)\tIn(512B)\tOut(512B)\n" \\r
+> -- \r
+> 1.7.10.4\r
+>\r
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> http://notmuchmail.org/mailman/listinfo/notmuch\r