1 Return-Path: <pieter@praet.org>
\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 0DD01429E26
\r
6 for <notmuch@notmuchmail.org>; Tue, 15 Nov 2011 08:55:04 -0800 (PST)
\r
7 X-Virus-Scanned: Debian amavisd-new at olra.theworths.org
\r
11 X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5
\r
12 tests=[RCVD_IN_DNSWL_LOW=-0.7] 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 lBbQwx8BerRJ for <notmuch@notmuchmail.org>;
\r
16 Tue, 15 Nov 2011 08:54:59 -0800 (PST)
\r
17 Received: from mail-ww0-f45.google.com (mail-ww0-f45.google.com
\r
18 [74.125.82.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client
\r
19 certificate requested) by olra.theworths.org (Postfix) with ESMTPS id
\r
20 CC7EC431FB6 for <notmuch@notmuchmail.org>; Tue, 15 Nov 2011 08:54:58 -0800
\r
22 Received: by wwf10 with SMTP id 10so6215574wwf.2
\r
23 for <notmuch@notmuchmail.org>; Tue, 15 Nov 2011 08:54:57 -0800 (PST)
\r
24 Received: by 10.180.85.161 with SMTP id i1mr31255512wiz.17.1321376095992;
\r
25 Tue, 15 Nov 2011 08:54:55 -0800 (PST)
\r
26 Received: from localhost ([109.131.148.49])
\r
27 by mx.google.com with ESMTPS id em10sm241624wib.21.2011.11.15.08.54.54
\r
28 (version=TLSv1/SSLv3 cipher=OTHER);
\r
29 Tue, 15 Nov 2011 08:54:55 -0800 (PST)
\r
30 From: Pieter Praet <pieter@praet.org>
\r
31 To: Tomi Ollila <tomi.ollila@iki.fi>,
\r
32 Jameson Graef Rollins <jrollins@finestructure.net>,
\r
33 Notmuch Mail <notmuch@notmuchmail.org>
\r
34 Subject: Re: [PATCH] test: use dtach(1) instead of screen(1) in emacs tests.
\r
35 In-Reply-To: <yf6ipmrdqs2.fsf@taco2.nixu.fi>
\r
36 References: <yf6mxc3ab4t.fsf@taco2.nixu.fi>
\r
37 <1320963737-1666-1-git-send-email-jrollins@finestructure.net>
\r
38 <87hb2btsv2.fsf@praet.org> <yf6ipmrdqs2.fsf@taco2.nixu.fi>
\r
39 User-Agent: Notmuch/0.9+76~g2fd88e6 (http://notmuchmail.org) Emacs/23.3.1
\r
40 (x86_64-unknown-linux-gnu)
\r
41 Date: Tue, 15 Nov 2011 17:53:57 +0100
\r
42 Message-ID: <87aa7xjpi2.fsf@praet.org>
\r
44 Content-Type: text/plain; charset=us-ascii
\r
45 X-BeenThere: notmuch@notmuchmail.org
\r
46 X-Mailman-Version: 2.1.13
\r
48 List-Id: "Use and development of the notmuch mail system."
\r
49 <notmuch.notmuchmail.org>
\r
50 List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,
\r
51 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
52 List-Archive: <http://notmuchmail.org/pipermail/notmuch>
\r
53 List-Post: <mailto:notmuch@notmuchmail.org>
\r
54 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
55 List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,
\r
56 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
57 X-List-Received-Date: Tue, 15 Nov 2011 16:55:04 -0000
\r
59 On Fri, 11 Nov 2011 10:09:17 +0200, Tomi Ollila <tomi.ollila@iki.fi> wrote:
\r
60 > On Fri, 11 Nov 2011 01:17:37 +0100, Pieter Praet <pieter@praet.org> wrote:
\r
61 > > On Thu, 10 Nov 2011 14:22:17 -0800, Jameson Graef Rollins <jrollins@finestructure.net> wrote:
\r
62 > > > From: Tomi Ollila <tomi.ollila@iki.fi>
\r
64 > > > dtach is lighter than screen and is not setuid/setgid program so
\r
65 > > > TMPDIR does not get reset by dynamic loader when executed.
\r
68 > > `dtach' may be lighter than `screen', but contrary to my expectations,
\r
69 > > it appears to be far less efficient:
\r
71 > > | | original [1] | w/ screen [2] | w/ dtach [3] |
\r
72 > > |------+--------------+---------------+--------------|
\r
73 > > | real | 0m17.570s | 0m20.132s | 0m28.567s |
\r
74 > > | user | 0m2.453s | 0m2.593s | 0m2.753s |
\r
75 > > | sys | 0m1.700s | 0m1.577s | 0m1.753s |
\r
77 > This sounds interesting; how were these runs measured?
\r
78 > Just using shell builtin time command ?
\r
83 > Does time measure the time of the process and it's subprocesses
\r
84 > or just the process. In any way 20 vs 28 second 'real' time difference
\r
85 > could indicate that there are more other processes running and
\r
86 > the context switch time affects user and system time.
\r
89 I just ran this rather crude ad-hoc script while off to make some coffee :)
\r
92 revs=(749abb74 760b311b tmp)
\r
94 cd ~/src/dev/notmuch
\r
95 until [ ${loop} == 0 ] ; do
\r
96 for i in ${revs[*]} ; do
\r
98 rm -rf /dev/shm/notmuch/*
\r
99 make clean >/dev/null 2>&1
\r
100 make >/dev/null 2>&1
\r
102 time make test OPTIONS="--root=/dev/shm/notmuch" | tail -
\r
108 So, I try to start with a blank slate and then simply time the entire
\r
109 test suite. This for each of the relevant commits ("tmp" is a branch on
\r
110 top of 760b311b, containing only the dtach patch), five times in a row.
\r
112 The results remained consistent between iterations (17s, 20s, 28s "real"
\r
113 time, without exception), so they should be fairly accurate.
\r
115 > Or, dtach does some stupid io things. Or screen does some advanced
\r
116 > optimizations. Or emacs works more effectively when TERM=screen.
\r
117 > Or the 'virtual' window size emacs sees is unsuitable...
\r
121 > > > Signed-off-by: Jameson Graef Rollins <jrollins@finestructure.net>
\r
123 > > > This tweaks the original patch slightly by removing the no-longer needed
\r
124 > > > screenrc variables.
\r
126 > > > test/test-lib.sh | 5 ++---
\r
127 > > > 1 files changed, 2 insertions(+), 3 deletions(-)
\r
129 > > > diff --git a/test/test-lib.sh b/test/test-lib.sh
\r
130 > > > index c81c709..c0fe037 100755
\r
131 > > > --- a/test/test-lib.sh
\r
132 > > > +++ b/test/test-lib.sh
\r
133 > > > @@ -50,8 +50,6 @@ TZ=UTC
\r
135 > > > export LANG LC_ALL PAGER TERM TZ
\r
136 > > > GIT_TEST_CMP=${GIT_TEST_CMP:-diff -u}
\r
137 > > > -export SCREENRC=/dev/null
\r
138 > > > -export SYSSCREENRC=/dev/null
\r
140 > > > # Protect ourselves from common misconfiguration to export
\r
141 > > > # CDPATH into the environment
\r
142 > > > @@ -844,7 +842,8 @@ test_emacs () {
\r
143 > > > if [ -z "$EMACS_SERVER" ]; then
\r
144 > > > EMACS_SERVER="notmuch-test-suite-$$"
\r
145 > > > # start a detached screen session with an emacs server
\r
146 > > > - screen -S "$EMACS_SERVER" -d -m "$TMP_DIRECTORY/run_emacs" \
\r
147 > > > + TERM=xterm dtach -n "$TMP_DIRECTORY/dtach-emacs-socket-$$" \
\r
149 > > It's worth noting that $TERM is only set to "xterm" to deceive `dtach',
\r
150 > > so thankfully, xterm (and all its deps) aren't actually required to run
\r
153 > Actually, emacs SIGSEGVs if there is unsuitable TERM in use. I don't know
\r
154 > what it originally was.
\r
157 Hmm, I may have jumped to conclusions there. I'm glad the part about
\r
158 being spared from xterm and friends was right, though... :)
\r
161 > > > + "$TMP_DIRECTORY/run_emacs" \
\r
162 > > > --no-window-system \
\r
163 > > > --eval "(setq server-name \"$EMACS_SERVER\")" \
\r
164 > > > --eval '(server-start)' \
\r
168 > > > _______________________________________________
\r
169 > > > notmuch mailing list
\r
170 > > > notmuch@notmuchmail.org
\r
171 > > > http://notmuchmail.org/mailman/listinfo/notmuch
\r
179 > > [1] @ commit 749abb74
\r
180 > > [2] @ commit 760b311b
\r
181 > > [3] @ commit 760b311b + id:"1320963737-1666-1-git-send-email-jrollins@finestructure.net"
\r
182 > > _______________________________________________
\r
183 > > notmuch mailing list
\r
184 > > notmuch@notmuchmail.org
\r
185 > > http://notmuchmail.org/mailman/listinfo/notmuch
\r