[Patch v2 2/4] perf-test: rename current tests as "time tests"
authordavid <david@tethera.net>
Mon, 24 Dec 2012 14:59:18 +0000 (10:59 +2000)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:52:42 +0000 (09:52 -0800)
71/e6f888904d8e08b4cbe5a36054a1cac1f4f818 [new file with mode: 0644]

diff --git a/71/e6f888904d8e08b4cbe5a36054a1cac1f4f818 b/71/e6f888904d8e08b4cbe5a36054a1cac1f4f818
new file mode 100644 (file)
index 0000000..4c3b9f0
--- /dev/null
@@ -0,0 +1,315 @@
+Return-Path: <bremner@tethera.net>\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 1B2F5431FBD\r
+       for <notmuch@notmuchmail.org>; Mon, 24 Dec 2012 06:59:39 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
+       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 3lP93YxRBqZj for <notmuch@notmuchmail.org>;\r
+       Mon, 24 Dec 2012 06:59:37 -0800 (PST)\r
+Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
+       (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
+       (No client certificate requested)\r
+       by olra.theworths.org (Postfix) with ESMTPS id 11257431FB6\r
+       for <notmuch@notmuchmail.org>; Mon, 24 Dec 2012 06:59:37 -0800 (PST)\r
+Received: from fctnnbsc30w-156034082078.dhcp-dynamic.fibreop.nb.bellaliant.net\r
+       ([156.34.82.78] helo=zancas.localnet)\r
+       by tesseract.cs.unb.ca with esmtpsa\r
+       (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1Tn9V9-0000TT-HU; Mon, 24 Dec 2012 10:59:36 -0400\r
+Received: from bremner by zancas.localnet with local (Exim 4.80)\r
+       (envelope-from <bremner@tethera.net>)\r
+       id 1Tn9V4-0001kZ-0W; Mon, 24 Dec 2012 10:59:30 -0400\r
+From: david@tethera.net\r
+To: notmuch@notmuchmail.org\r
+Subject: [Patch v2 2/4] perf-test: rename current tests as "time tests"\r
+Date: Mon, 24 Dec 2012 10:59:18 -0400\r
+Message-Id: <1356361160-6449-3-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 1.7.10.4\r
+In-Reply-To: <1356361160-6449-1-git-send-email-david@tethera.net>\r
+References: <1356361160-6449-1-git-send-email-david@tethera.net>\r
+X-Spam_bar: -\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: Mon, 24 Dec 2012 14:59:39 -0000\r
+\r
+From: David Bremner <bremner@debian.org>\r
+\r
+This is almost entirely renaming files, except for updating a few\r
+references to those file names, and changing the makefile target.\r
+\r
+A new set of memory tests will be run separately because they take\r
+much longer.\r
+---\r
+ performance-test/00-new            |   15 ---------------\r
+ performance-test/01-dump-restore   |   13 -------------\r
+ performance-test/02-tag            |   14 --------------\r
+ performance-test/Makefile.local    |    2 +-\r
+ performance-test/README            |    9 +++++----\r
+ performance-test/T00-new           |   15 +++++++++++++++\r
+ performance-test/T01-dump-restore  |   13 +++++++++++++\r
+ performance-test/T02-tag           |   14 ++++++++++++++\r
+ performance-test/notmuch-perf-test |   27 ---------------------------\r
+ performance-test/notmuch-time-test |   27 +++++++++++++++++++++++++++\r
+ 10 files changed, 75 insertions(+), 74 deletions(-)\r
+ delete mode 100755 performance-test/00-new\r
+ delete mode 100755 performance-test/01-dump-restore\r
+ delete mode 100755 performance-test/02-tag\r
+ create mode 100755 performance-test/T00-new\r
+ create mode 100755 performance-test/T01-dump-restore\r
+ create mode 100755 performance-test/T02-tag\r
+ delete mode 100755 performance-test/notmuch-perf-test\r
+ create mode 100755 performance-test/notmuch-time-test\r
+\r
+diff --git a/performance-test/00-new b/performance-test/00-new\r
+deleted file mode 100755\r
+index 553bb8b..0000000\r
+--- a/performance-test/00-new\r
++++ /dev/null\r
+@@ -1,15 +0,0 @@\r
+-#!/bin/bash\r
+-\r
+-test_description='notmuch new'\r
+-\r
+-. ./perf-test-lib.sh\r
+-\r
+-uncache_database\r
+-\r
+-time_start\r
+-\r
+-for i in $(seq 2 6); do\r
+-    time_run "notmuch new #$i" 'notmuch new'\r
+-done\r
+-\r
+-time_done\r
+diff --git a/performance-test/01-dump-restore b/performance-test/01-dump-restore\r
+deleted file mode 100755\r
+index b2ff940..0000000\r
+--- a/performance-test/01-dump-restore\r
++++ /dev/null\r
+@@ -1,13 +0,0 @@\r
+-#!/bin/bash\r
+-\r
+-test_description='dump and restore'\r
+-\r
+-. ./perf-test-lib.sh\r
+-\r
+-time_start\r
+-\r
+-time_run 'load nmbug tags' 'notmuch restore --accumulate < corpus.tags/nmbug.sup-dump'\r
+-time_run 'dump *' 'notmuch dump > tags.out'\r
+-time_run 'restore *' 'notmuch restore < tags.out'\r
+-\r
+-time_done\r
+diff --git a/performance-test/02-tag b/performance-test/02-tag\r
+deleted file mode 100755\r
+index 78ceccc..0000000\r
+--- a/performance-test/02-tag\r
++++ /dev/null\r
+@@ -1,14 +0,0 @@\r
+-#!/bin/bash\r
+-\r
+-test_description='tagging'\r
+-\r
+-. ./perf-test-lib.sh\r
+-\r
+-time_start\r
+-\r
+-time_run 'tag * +new_tag' "notmuch tag +new_tag '*'"\r
+-time_run 'tag * +existing_tag' "notmuch tag +new_tag '*'"\r
+-time_run 'tag * -existing_tag' "notmuch tag -new_tag '*'"\r
+-time_run 'tag * -missing_tag' "notmuch tag -new_tag '*'"\r
+-\r
+-time_done\r
+diff --git a/performance-test/Makefile.local b/performance-test/Makefile.local\r
+index 3834e4d..57beb44 100644\r
+--- a/performance-test/Makefile.local\r
++++ b/performance-test/Makefile.local\r
+@@ -10,7 +10,7 @@ SIGFILE := ${TXZFILE}.asc\r
+ TEST_SCRIPT := ${dir}/notmuch-perf-test\r
+ DEFAULT_URL :=  http://notmuchmail.org/releases/${CORPUS_NAME}\r
\r
+-perf-test: setup-perf-test all\r
++time-test: setup-perf-test all\r
+       $(TEST_SCRIPT) $(OPTIONS)\r
\r
+ .PHONY: download-corpus setup-perf-test\r
+diff --git a/performance-test/README b/performance-test/README\r
+index 1481660..d1fb6de 100644\r
+--- a/performance-test/README\r
++++ b/performance-test/README\r
+@@ -36,8 +36,8 @@ for a list of mirrors.\r
+ Running tests\r
+ -------------\r
\r
+-The easiest way to run performance tests is to say "make perf-test", (or\r
+-simply run the notmuch-perf-test script). Either command will run all\r
++The easiest way to run performance tests is to say "make time-test", (or\r
++simply run the notmuch-time-test script). Either command will run all\r
+ available performance tests.\r
\r
+ Alternately, you can run a specific subset of tests by simply invoking\r
+@@ -51,7 +51,7 @@ Each test script supports the following arguments\r
+ Writing tests\r
+ -------------\r
\r
+-Have a look at "01-dump-restore" for an example. Sourcing\r
++Have a look at "T01-dump-restore" for an example. Sourcing\r
+ "perf-test-lib.sh" is mandatory.  Utility functions include\r
\r
+ - 'add_email_corpus' unpacks a set of messages and adds them to the database.\r
+@@ -65,4 +65,5 @@ Have a look at "01-dump-restore" for an example. Sourcing\r
\r
+ Scripts are run in the order specified in notmuch-perf-test. In the\r
+ future this order might be chosen automatically so please follow the\r
+-convention of starting the name with two digits to specify the order.\r
++convention of starting the name with 'T' followed by two digits to\r
++specify the order.\r
+diff --git a/performance-test/T00-new b/performance-test/T00-new\r
+new file mode 100755\r
+index 0000000..553bb8b\r
+--- /dev/null\r
++++ b/performance-test/T00-new\r
+@@ -0,0 +1,15 @@\r
++#!/bin/bash\r
++\r
++test_description='notmuch new'\r
++\r
++. ./perf-test-lib.sh\r
++\r
++uncache_database\r
++\r
++time_start\r
++\r
++for i in $(seq 2 6); do\r
++    time_run "notmuch new #$i" 'notmuch new'\r
++done\r
++\r
++time_done\r
+diff --git a/performance-test/T01-dump-restore b/performance-test/T01-dump-restore\r
+new file mode 100755\r
+index 0000000..b2ff940\r
+--- /dev/null\r
++++ b/performance-test/T01-dump-restore\r
+@@ -0,0 +1,13 @@\r
++#!/bin/bash\r
++\r
++test_description='dump and restore'\r
++\r
++. ./perf-test-lib.sh\r
++\r
++time_start\r
++\r
++time_run 'load nmbug tags' 'notmuch restore --accumulate < corpus.tags/nmbug.sup-dump'\r
++time_run 'dump *' 'notmuch dump > tags.out'\r
++time_run 'restore *' 'notmuch restore < tags.out'\r
++\r
++time_done\r
+diff --git a/performance-test/T02-tag b/performance-test/T02-tag\r
+new file mode 100755\r
+index 0000000..78ceccc\r
+--- /dev/null\r
++++ b/performance-test/T02-tag\r
+@@ -0,0 +1,14 @@\r
++#!/bin/bash\r
++\r
++test_description='tagging'\r
++\r
++. ./perf-test-lib.sh\r
++\r
++time_start\r
++\r
++time_run 'tag * +new_tag' "notmuch tag +new_tag '*'"\r
++time_run 'tag * +existing_tag' "notmuch tag +new_tag '*'"\r
++time_run 'tag * -existing_tag' "notmuch tag -new_tag '*'"\r
++time_run 'tag * -missing_tag' "notmuch tag -new_tag '*'"\r
++\r
++time_done\r
+diff --git a/performance-test/notmuch-perf-test b/performance-test/notmuch-perf-test\r
+deleted file mode 100755\r
+index fc39d8a..0000000\r
+--- a/performance-test/notmuch-perf-test\r
++++ /dev/null\r
+@@ -1,27 +0,0 @@\r
+-#!/usr/bin/env bash\r
+-\r
+-# Run tests\r
+-#\r
+-# Copyright (c) 2005 Junio C Hamano\r
+-#\r
+-# Adapted from a Makefile to a shell script by Carl Worth (2010)\r
+-\r
+-if [ ${BASH_VERSINFO[0]} -lt 4 ]; then\r
+-    echo "Error: The notmuch test suite requires a bash version >= 4.0"\r
+-    echo "due to use of associative arrays within the test suite."\r
+-    echo "Please try again with a newer bash (or help us fix the"\r
+-    echo "test suite to be more portable). Thanks."\r
+-    exit 1\r
+-fi\r
+-\r
+-cd $(dirname "$0")\r
+-\r
+-TESTS="\r
+-  00-new\r
+-  01-dump-restore\r
+-  02-tag\r
+-"\r
+-\r
+-for test in $TESTS; do\r
+-    ./$test "$@"\r
+-done\r
+diff --git a/performance-test/notmuch-time-test b/performance-test/notmuch-time-test\r
+new file mode 100755\r
+index 0000000..54a208f\r
+--- /dev/null\r
++++ b/performance-test/notmuch-time-test\r
+@@ -0,0 +1,27 @@\r
++#!/usr/bin/env bash\r
++\r
++# Run tests\r
++#\r
++# Copyright (c) 2005 Junio C Hamano\r
++#\r
++# Adapted from a Makefile to a shell script by Carl Worth (2010)\r
++\r
++if [ ${BASH_VERSINFO[0]} -lt 4 ]; then\r
++    echo "Error: The notmuch test suite requires a bash version >= 4.0"\r
++    echo "due to use of associative arrays within the test suite."\r
++    echo "Please try again with a newer bash (or help us fix the"\r
++    echo "test suite to be more portable). Thanks."\r
++    exit 1\r
++fi\r
++\r
++cd $(dirname "$0")\r
++\r
++TESTS="\r
++  T00-new\r
++  T01-dump-restore\r
++  T02-tag\r
++"\r
++\r
++for test in $TESTS; do\r
++    ./$test "$@"\r
++done\r
+-- \r
+1.7.10.4\r
+\r