From: david Date: Tue, 4 Dec 2012 04:18:31 +0000 (+2000) Subject: [PATCH 3/4] perf-test: unpack tags. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=0dd902b6a8a25d0a1745b154e3bd72c74849ae11;p=notmuch-archives.git [PATCH 3/4] perf-test: unpack tags. --- diff --git a/12/070d65e3ff1b15640d17cbc20a52b4bf3b471c b/12/070d65e3ff1b15640d17cbc20a52b4bf3b471c new file mode 100644 index 000000000..64ed7372f --- /dev/null +++ b/12/070d65e3ff1b15640d17cbc20a52b4bf3b471c @@ -0,0 +1,126 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 882F3431FC7 + for ; Mon, 3 Dec 2012 20:19:13 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Spam-Flag: NO +X-Spam-Score: 0 +X-Spam-Level: +X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] + autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id kPEqFJVLjm+z for ; + Mon, 3 Dec 2012 20:19:12 -0800 (PST) +Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238]) + (using TLSv1 with cipher AES256-SHA (256/256 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id ACCE0431FCB + for ; Mon, 3 Dec 2012 20:19:05 -0800 (PST) +Received: from fctnnbsc30w-142167090129.dhcp-dynamic.fibreop.nb.bellaliant.net + ([142.167.90.129] helo=zancas.localnet) + by tesseract.cs.unb.ca with esmtpsa + (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) + (envelope-from ) + id 1TfjyK-0008Dg-VO; Tue, 04 Dec 2012 00:19:05 -0400 +Received: from bremner by zancas.localnet with local (Exim 4.80) + (envelope-from ) + id 1TfjyF-0001MX-HF; Tue, 04 Dec 2012 00:18:59 -0400 +From: david@tethera.net +To: notmuch@notmuchmail.org +Subject: [PATCH 3/4] perf-test: unpack tags. +Date: Tue, 4 Dec 2012 00:18:31 -0400 +Message-Id: <1354594712-5179-3-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.7.10.4 +In-Reply-To: <1354594712-5179-1-git-send-email-david@tethera.net> +References: <1354583824-10520-3-git-send-email-david@tethera.net> + <1354594712-5179-1-git-send-email-david@tethera.net> +X-Spam_bar: - +Cc: David Bremner +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Tue, 04 Dec 2012 04:19:14 -0000 + +From: David Bremner + +It's a bit annoying to call tar twice, but we cache the results so it +isn't as bad as it could be. +--- + performance-test/Makefile.local | 1 + + performance-test/perf-test-lib.sh | 25 +++++++++++++++++++------ + 2 files changed, 20 insertions(+), 6 deletions(-) + +diff --git a/performance-test/Makefile.local b/performance-test/Makefile.local +index b136a88..cdd7f19 100644 +--- a/performance-test/Makefile.local ++++ b/performance-test/Makefile.local +@@ -30,3 +30,4 @@ download-corpus: + wget -O ${TXZFILE} ${DEFAULT_URL} + + CLEAN := $(CLEAN) $(dir)/tmp.* $(dir)/corpus.mail.* $(dir)/notmuch.cache.* ++CLEAN := $(CLEAN) $(dir)/corpus.tags +diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh +index 08e2ebd..40c88c9 100644 +--- a/performance-test/perf-test-lib.sh ++++ b/performance-test/perf-test-lib.sh +@@ -41,6 +41,13 @@ DB_CACHE_DIR=${TEST_DIRECTORY}/notmuch.cache.$corpus_size + add_email_corpus () + { + rm -rf ${MAIL_DIR} ++ ++ if command -v pixz > /dev/null; then ++ XZ=pixz ++ else ++ XZ=xz ++ fi ++ + if [ ! -d $CORPUS_DIR ]; then + case "$corpus_size" in + small) +@@ -53,12 +60,6 @@ add_email_corpus () + arg=mail + esac + +- if command -v pixz > /dev/null; then +- XZ=pixz +- else +- XZ=xz +- fi +- + printf "Unpacking corpus\n" + mkdir $CORPUS_DIR + +@@ -72,6 +73,18 @@ add_email_corpus () + + fi + ++ if [ ! -d $TEST_DIRECTORY/corpus.tags ]; then ++ ++ mkdir $TEST_DIRECTORY/corpus.tags ++ ++ tar --extract --strip-components=2 \ ++ --directory $TEST_DIRECTORY/corpus.tags \ ++ --use-compress-program ${XZ} \ ++ --file ../download/notmuch-email-corpus-${PERFTEST_VERSION}.tar.xz \ ++ notmuch-email-corpus/tags ++ fi ++ ++ cp -lr $TEST_DIRECTORY/corpus.tags $TMP_DIRECTORY + cp -lr $CORPUS_DIR $MAIL_DIR + + if [ -d $DB_CACHE_DIR ]; then +-- +1.7.10.4 +