Re: [PATCH 0/4] Allow specifying alternate names for addresses in other_email
[notmuch-archives.git] / d8 / d099f5378882e563e4445eb59d8cc47d7f2f48
1 Return-Path: <bremner@tethera.net>\r
2 X-Original-To: notmuch@notmuchmail.org\r
3 Delivered-To: notmuch@notmuchmail.org\r
4 Received: from localhost (localhost [127.0.0.1])\r
5         by olra.theworths.org (Postfix) with ESMTP id 2CA40431FBF\r
6         for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 04:45:34 -0800 (PST)\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
8 X-Spam-Flag: NO\r
9 X-Spam-Score: 0\r
10 X-Spam-Level: \r
11 X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none]\r
12         autolearn=disabled\r
13 Received: from olra.theworths.org ([127.0.0.1])\r
14         by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
15         with ESMTP id DfXxvK8EB5G3 for <notmuch@notmuchmail.org>;\r
16         Sat, 15 Dec 2012 04:45:32 -0800 (PST)\r
17 Received: from tesseract.cs.unb.ca (tesseract.cs.unb.ca [131.202.240.238])\r
18         (using TLSv1 with cipher AES256-SHA (256/256 bits))\r
19         (No client certificate requested)\r
20         by olra.theworths.org (Postfix) with ESMTPS id 86ABC421165\r
21         for <notmuch@notmuchmail.org>; Sat, 15 Dec 2012 04:45:29 -0800 (PST)\r
22 Received: from fctnnbsc30w-142167090129.dhcp-dynamic.fibreop.nb.bellaliant.net\r
23         ([142.167.90.129] helo=zancas.localnet)\r
24         by tesseract.cs.unb.ca with esmtpsa\r
25         (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72)\r
26         (envelope-from <bremner@tethera.net>)\r
27         id 1Tjr7Q-0006C4-LL; Sat, 15 Dec 2012 08:45:28 -0400\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1Tjr7L-00008s-4T; Sat, 15 Dec 2012 08:45:23 -0400\r
31 From: david@tethera.net\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [Patch v3 10/11] perf-test: split basic into 00-new, 01-dump-restore,\r
34         and 02-tag\r
35 Date: Sat, 15 Dec 2012 08:45:13 -0400\r
36 Message-Id: <1355575514-32735-11-git-send-email-david@tethera.net>\r
37 X-Mailer: git-send-email 1.7.10.4\r
38 In-Reply-To: <1355575514-32735-1-git-send-email-david@tethera.net>\r
39 References: <1355575514-32735-1-git-send-email-david@tethera.net>\r
40 X-Spam_bar: -\r
41 Cc: David Bremner <bremner@debian.org>\r
42 X-BeenThere: notmuch@notmuchmail.org\r
43 X-Mailman-Version: 2.1.13\r
44 Precedence: list\r
45 List-Id: "Use and development of the notmuch mail system."\r
46         <notmuch.notmuchmail.org>\r
47 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
48         <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
49 List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
50 List-Post: <mailto:notmuch@notmuchmail.org>\r
51 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
52 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
53         <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
54 X-List-Received-Date: Sat, 15 Dec 2012 12:45:34 -0000\r
55 \r
56 From: David Bremner <bremner@debian.org>\r
57 \r
58 We use the new "time_start" function to restore the database from cache\r
59 if possible.\r
60 ---\r
61  performance-test/00-new            |   19 +++++++++++++++++++\r
62  performance-test/01-dump-restore   |   12 ++++++++++++\r
63  performance-test/02-tag            |   14 ++++++++++++++\r
64  performance-test/README            |    8 ++++++--\r
65  performance-test/basic             |   20 --------------------\r
66  performance-test/notmuch-perf-test |    4 +++-\r
67  6 files changed, 54 insertions(+), 23 deletions(-)\r
68  create mode 100755 performance-test/00-new\r
69  create mode 100755 performance-test/01-dump-restore\r
70  create mode 100755 performance-test/02-tag\r
71  delete mode 100755 performance-test/basic\r
72 \r
73 diff --git a/performance-test/00-new b/performance-test/00-new\r
74 new file mode 100755\r
75 index 0000000..6f0b50c\r
76 --- /dev/null\r
77 +++ b/performance-test/00-new\r
78 @@ -0,0 +1,19 @@\r
79 +#!/bin/bash\r
80 +\r
81 +test_description='notmuch new'\r
82 +\r
83 +. ./perf-test-lib.sh\r
84 +\r
85 +uncache_database\r
86 +\r
87 +time_start\r
88 +\r
89 +time_run 'initial notmuch new' 'notmuch new'\r
90 +\r
91 +cache_database\r
92 +\r
93 +for i in $(seq 2 6); do\r
94 +    time_run "notmuch new #$i" 'notmuch new'\r
95 +done\r
96 +\r
97 +time_done\r
98 diff --git a/performance-test/01-dump-restore b/performance-test/01-dump-restore\r
99 new file mode 100755\r
100 index 0000000..0ee3a28\r
101 --- /dev/null\r
102 +++ b/performance-test/01-dump-restore\r
103 @@ -0,0 +1,12 @@\r
104 +#!/bin/bash\r
105 +\r
106 +test_description='dump and restore'\r
107 +\r
108 +. ./perf-test-lib.sh\r
109 +\r
110 +time_start\r
111 +\r
112 +time_run 'dump *' 'notmuch dump > tags.out'\r
113 +time_run 'restore *' 'notmuch restore < tags.out'\r
114 +\r
115 +time_done\r
116 diff --git a/performance-test/02-tag b/performance-test/02-tag\r
117 new file mode 100755\r
118 index 0000000..78ceccc\r
119 --- /dev/null\r
120 +++ b/performance-test/02-tag\r
121 @@ -0,0 +1,14 @@\r
122 +#!/bin/bash\r
123 +\r
124 +test_description='tagging'\r
125 +\r
126 +. ./perf-test-lib.sh\r
127 +\r
128 +time_start\r
129 +\r
130 +time_run 'tag * +new_tag' "notmuch tag +new_tag '*'"\r
131 +time_run 'tag * +existing_tag' "notmuch tag +new_tag '*'"\r
132 +time_run 'tag * -existing_tag' "notmuch tag -new_tag '*'"\r
133 +time_run 'tag * -missing_tag' "notmuch tag -new_tag '*'"\r
134 +\r
135 +time_done\r
136 diff --git a/performance-test/README b/performance-test/README\r
137 index d36612d..1481660 100644\r
138 --- a/performance-test/README\r
139 +++ b/performance-test/README\r
140 @@ -51,8 +51,8 @@ Each test script supports the following arguments\r
141  Writing tests\r
142  -------------\r
143  \r
144 -Have a look at "basic" for an example. Sourcing "perf-test-lib.sh" is\r
145 -mandatory.  Utility functions include\r
146 +Have a look at "01-dump-restore" for an example. Sourcing\r
147 +"perf-test-lib.sh" is mandatory.  Utility functions include\r
148  \r
149  - 'add_email_corpus' unpacks a set of messages and adds them to the database.\r
150  - 'cache_database': makes a snapshot of the current database\r
151 @@ -62,3 +62,7 @@ mandatory.  Utility functions include\r
152     cannot find a cache of the appropriate corpus.\r
153  - 'time_done' does the cleanup; comment it out or pass --debug to the\r
154    script to leave the temporary files around.\r
155 +\r
156 +Scripts are run in the order specified in notmuch-perf-test. In the\r
157 +future this order might be chosen automatically so please follow the\r
158 +convention of starting the name with two digits to specify the order.\r
159 diff --git a/performance-test/basic b/performance-test/basic\r
160 deleted file mode 100755\r
161 index 41a7ff1..0000000\r
162 --- a/performance-test/basic\r
163 +++ /dev/null\r
164 @@ -1,20 +0,0 @@\r
165 -#!/bin/bash\r
166 -\r
167 -. ./perf-test-lib.sh\r
168 -\r
169 -uncache_database\r
170 -\r
171 -add_email_corpus\r
172 -\r
173 -print_header\r
174 -\r
175 -time_run 'initial notmuch new' 'notmuch new'\r
176 -\r
177 -cache_database\r
178 -\r
179 -time_run 'second notmuch new' 'notmuch new'\r
180 -time_run 'dump *' 'notmuch dump > tags.out'\r
181 -time_run 'restore *' 'notmuch restore < tags.out'\r
182 -time_run 'tag * +new_tag' "notmuch tag +new_tag '*'"\r
183 -\r
184 -time_done\r
185 diff --git a/performance-test/notmuch-perf-test b/performance-test/notmuch-perf-test\r
186 index 1bea345..fc39d8a 100755\r
187 --- a/performance-test/notmuch-perf-test\r
188 +++ b/performance-test/notmuch-perf-test\r
189 @@ -17,7 +17,9 @@ fi\r
190  cd $(dirname "$0")\r
191  \r
192  TESTS="\r
193 -  basic\r
194 +  00-new\r
195 +  01-dump-restore\r
196 +  02-tag\r
197  "\r
198  \r
199  for test in $TESTS; do\r
200 -- \r
201 1.7.10.4\r
202 \r