Re: notmuch.readthedocs.org
[notmuch-archives.git] / c4 / 831dd115b99afe1291dd3b883c8cc1dc001c6e
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 BA5A7431FAE\r
6         for <notmuch@notmuchmail.org>; Wed,  5 Dec 2012 19:02:14 -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 N0auSXSf6z0a for <notmuch@notmuchmail.org>;\r
16         Wed,  5 Dec 2012 19:02:13 -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 87247431FBC\r
21         for <notmuch@notmuchmail.org>; Wed,  5 Dec 2012 19:02:11 -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 1TgRiz-0002D4-Gj; Wed, 05 Dec 2012 23:02:09 -0400\r
28 Received: from bremner by zancas.localnet with local (Exim 4.80)\r
29         (envelope-from <bremner@tethera.net>)\r
30         id 1TgRiu-0001Z7-1g; Wed, 05 Dec 2012 23:02:04 -0400\r
31 From: david@tethera.net\r
32 To: notmuch@notmuchmail.org\r
33 Subject: [Patch v2 10/11] perf-test: split basic into 00-new and\r
34         01-dump-restore\r
35 Date: Wed,  5 Dec 2012 23:01:47 -0400\r
36 Message-Id: <1354762908-5788-11-git-send-email-david@tethera.net>\r
37 X-Mailer: git-send-email 1.7.10.4\r
38 In-Reply-To: <1354762908-5788-1-git-send-email-david@tethera.net>\r
39 References: <1354762908-5788-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: Thu, 06 Dec 2012 03:02:15 -0000\r
55 \r
56 From: David Bremner <bremner@debian.org>\r
57 \r
58 We rely on subsequent "notmuch new" invocations being relatively fast\r
59 rather than trying to detect if notmuch-new needs to be run.\r
60 ---\r
61  performance-test/00-new            |   21 +++++++++++++++++++++\r
62  performance-test/01-dump-restore   |   15 +++++++++++++++\r
63  performance-test/README            |    8 ++++++--\r
64  performance-test/basic             |   20 --------------------\r
65  performance-test/notmuch-perf-test |    3 ++-\r
66  5 files changed, 44 insertions(+), 23 deletions(-)\r
67  create mode 100755 performance-test/00-new\r
68  create mode 100755 performance-test/01-dump-restore\r
69  delete mode 100755 performance-test/basic\r
70 \r
71 diff --git a/performance-test/00-new b/performance-test/00-new\r
72 new file mode 100755\r
73 index 0000000..02db874\r
74 --- /dev/null\r
75 +++ b/performance-test/00-new\r
76 @@ -0,0 +1,21 @@\r
77 +#!/bin/bash\r
78 +\r
79 +test_description='notmuch new'\r
80 +\r
81 +. ./perf-test-lib.sh\r
82 +\r
83 +uncache_database\r
84 +\r
85 +add_email_corpus\r
86 +\r
87 +print_header\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..09444e3\r
101 --- /dev/null\r
102 +++ b/performance-test/01-dump-restore\r
103 @@ -0,0 +1,15 @@\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 +add_email_corpus\r
111 +\r
112 +print_header\r
113 +\r
114 +time_run 'notmuch new' 'notmuch new'\r
115 +time_run 'dump *' 'notmuch dump > tags.out'\r
116 +time_run 'restore *' 'notmuch restore < tags.out'\r
117 +\r
118 +time_done\r
119 diff --git a/performance-test/README b/performance-test/README\r
120 index fd5c977..35489a9 100644\r
121 --- a/performance-test/README\r
122 +++ b/performance-test/README\r
123 @@ -51,8 +51,8 @@ Each test script supports the following arguments\r
124  Writing tests\r
125  -------------\r
126  \r
127 -Have a look at "basic" for an example. Sourcing "perf-test-lib.sh" is\r
128 -mandatory.  Utility functions include\r
129 +Have a look at "01-dump-restore" for an example. Sourcing\r
130 +"perf-test-lib.sh" is mandatory.  Utility functions include\r
131  \r
132  - 'add_email_corpus' unpacks a set of messages and adds them to the database.\r
133  - 'cache_database': makes a snapshot of the current database\r
134 @@ -60,3 +60,7 @@ mandatory.  Utility functions include\r
135    database.\r
136  - 'time_done' does the cleanup; comment it out or pass --debug to the\r
137    script to leave the temporary files around.\r
138 +\r
139 +Scripts are run in the order specified in notmuch-perf-test. In the\r
140 +future this order might be chosen automatically so please follow the\r
141 +convention of starting the name with two digits to specify the order.\r
142 diff --git a/performance-test/basic b/performance-test/basic\r
143 deleted file mode 100755\r
144 index 41a7ff1..0000000\r
145 --- a/performance-test/basic\r
146 +++ /dev/null\r
147 @@ -1,20 +0,0 @@\r
148 -#!/bin/bash\r
149 -\r
150 -. ./perf-test-lib.sh\r
151 -\r
152 -uncache_database\r
153 -\r
154 -add_email_corpus\r
155 -\r
156 -print_header\r
157 -\r
158 -time_run 'initial notmuch new' 'notmuch new'\r
159 -\r
160 -cache_database\r
161 -\r
162 -time_run 'second notmuch new' 'notmuch new'\r
163 -time_run 'dump *' 'notmuch dump > tags.out'\r
164 -time_run 'restore *' 'notmuch restore < tags.out'\r
165 -time_run 'tag * +new_tag' "notmuch tag +new_tag '*'"\r
166 -\r
167 -time_done\r
168 diff --git a/performance-test/notmuch-perf-test b/performance-test/notmuch-perf-test\r
169 index 1bea345..f93d8a4 100755\r
170 --- a/performance-test/notmuch-perf-test\r
171 +++ b/performance-test/notmuch-perf-test\r
172 @@ -17,7 +17,8 @@ fi\r
173  cd $(dirname "$0")\r
174  \r
175  TESTS="\r
176 -  basic\r
177 +  00-new\r
178 +  01-dump-restore\r
179  "\r
180  \r
181  for test in $TESTS; do\r
182 -- \r
183 1.7.10.4\r
184 \r