From: david Date: Tue, 4 Dec 2012 01:17:02 +0000 (+2000) Subject: [PATCH 1/3] performance-test: add argument parsing for performance tests. X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=11b05b462df00920d5ee8c7f111455d0c8fcbdeb;p=notmuch-archives.git [PATCH 1/3] performance-test: add argument parsing for performance tests. --- diff --git a/26/624eef67d641a14f2c74fa87ee7c4c2f6d2595 b/26/624eef67d641a14f2c74fa87ee7c4c2f6d2595 new file mode 100644 index 000000000..4b8b281b6 --- /dev/null +++ b/26/624eef67d641a14f2c74fa87ee7c4c2f6d2595 @@ -0,0 +1,99 @@ +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 095D5431FB6 + for ; Mon, 3 Dec 2012 17:17:24 -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 Zd1K3j8NFO8d for ; + Mon, 3 Dec 2012 17:17:18 -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 D2A5E431FAE + for ; Mon, 3 Dec 2012 17:17:18 -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 1Tfh8L-00081K-DD; Mon, 03 Dec 2012 21:17:15 -0400 +Received: from bremner by zancas.localnet with local (Exim 4.80) + (envelope-from ) + id 1Tfh8F-0002kL-JU; Mon, 03 Dec 2012 21:17:07 -0400 +From: david@tethera.net +To: notmuch@notmuchmail.org +Subject: [PATCH 1/3] performance-test: add argument parsing for performance + tests. +Date: Mon, 3 Dec 2012 21:17:02 -0400 +Message-Id: <1354583824-10520-1-git-send-email-david@tethera.net> +X-Mailer: git-send-email 1.7.10.4 +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 01:17:24 -0000 + +From: David Bremner + +This patch just sets (non-exported) variables. The variable $debug is +already used, and $corpus_size will be used in following commits. +--- + performance-test/perf-test-lib.sh | 25 +++++++++++++++++++++++++ + 1 file changed, 25 insertions(+) + +diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh +index 1399d05..bba793d 100644 +--- a/performance-test/perf-test-lib.sh ++++ b/performance-test/perf-test-lib.sh +@@ -1,5 +1,30 @@ + . ./version.sh + ++corpus_size=large ++ ++while test "$#" -ne 0 ++do ++ case "$1" in ++ -d|--debug) ++ debug=t; ++ shift ++ ;; ++ -s|--small) ++ corpus_size=small; ++ shift ++ ;; ++ -m|--medium) ++ corpus_size=medium; ++ shift ++ ;; ++ -l|--large) ++ corpus_size=large; ++ shift ++ ;; ++ *) ++ echo "error: unknown performance test option '$1'" >&2; exit 1 ;; ++ esac ++done + . ../test/test-lib-common.sh + + set -e +-- +1.7.10.4 +