From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ECvlNOWYlmBkvwAAgWs5BA (envelope-from ) for ; Sat, 08 May 2021 15:57:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aM9+MOWYlmAYIwAAB5/wlQ (envelope-from ) for ; Sat, 08 May 2021 13:57:57 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 881E3E6F4 for ; Sat, 8 May 2021 15:57:57 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 77F6F271D0; Sat, 8 May 2021 09:57:51 -0400 (EDT) Received: from fethera.tethera.net (unknown [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id 35D6D2716D for ; Sat, 8 May 2021 09:57:48 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id E6FF260845; Sat, 8 May 2021 09:57:47 -0400 (EDT) Received: (nullmailer pid 3548287 invoked by uid 1000); Sat, 08 May 2021 13:57:46 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH] perf-test/T00-new: fix backup creation. Date: Sat, 8 May 2021 10:57:35 -0300 Message-Id: <20210508135735.3548187-1-david@tethera.net> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Message-ID-Hash: EVKLJH37FTTJGC2TEAU7FBXHXNQPA7YS X-Message-ID-Hash: EVKLJH37FTTJGC2TEAU7FBXHXNQPA7YS X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620482277; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qgSXaMB52nvDQGaJKODqmvDuzXEsXfO0oWaPC/gXMkk=; b=OOw4y0z/Hoq0s5Uom2S1nzFp0JfgudexM0/NZnjTUwGq2K2k6f0Ot5b24rC5ofoq5llXxu 3UGwE8oI8NPEa8aYMRNIVoxrHTYJfphEE/oX3SmT3PeZFw1nDz0dB5Hxu0PQrWeX+gxQud UWxeUCb9UBfokVtacDQyUsF8NjU21WLqGMJTIdNdcZQ0IR+j4sjYXbh/Uhvn1u10Qk5Gil NWXr/WRQ1JGuik9MyrfaP7IXS1viJF2hUWoq3EieMQABlLhJG9nXyQKl+2y8WUROM84l2v aK8teffxve9hKYIh+It9kKai1m3JkAh5ksbIGRdmNGQUuSuKNhflObAYCwOezQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620482277; a=rsa-sha256; cv=none; b=uR6mNtVPxPS3QQuiX6VtbVF7wYyldldOVJW097GOUckih7RFM7zH6knTpIlSs61eOd0dMN cSUonq6SrMotTGJ54IRWHATPgF1EJCTu+n6qhxcVydV/zIMmsfiBOYDKRkZnVNDxjKeCfW iRhiSCHK1KmNG0jY5Xz/fuKJGfLK3rlYiMuF2ngexFMX2fqJIeeL6HpBgp2HM4cN+DgJ+x 6+pSjse3TacsEtDzeTF2SH9l/BOS5w0Hnt6J1zgNrBjLs1uzMU6kFkbxkg2w8RFwIP34qq m14ZkUgiUMyE8ko/TkUHYJOJgmLKx9JVlHbCC4cXWhpDjEEKa93E1LC86ckVLg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.05 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 881E3E6F4 X-Spam-Score: -1.05 X-Migadu-Scanner: scn0.migadu.com X-TUID: IGSdXgv6O5qx "xargs tar cf backup.tar < $manifest" recreates the tar file with each "batch" execed by xargs. In general this results in only a fraction of the desired files being backed up. --- I'm not sure if this is worth including in the point release: both the risk and the benefit are relatively low since breaking the performance suite probably mainly annoys me. performance-test/T00-new.sh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/performance-test/T00-new.sh b/performance-test/T00-new.sh index 53de1c27..de260b2d 100755 --- a/performance-test/T00-new.sh +++ b/performance-test/T00-new.sh @@ -5,16 +5,16 @@ test_description='notmuch new' . $(dirname "$0")/perf-test-lib.sh || exit 1 uncache_database - time_start +manifest=$(mktemp manifestXXXXXX) +find mail -type f ! -path 'mail/.notmuch/*' | sed -n '1~4 p' > $manifest +xargs tar uf backup.tar < $manifest + for i in $(seq 2 6); do time_run "notmuch new #$i" 'notmuch new' done -manifest=$(mktemp manifestXXXXXX) - -find mail -type f ! -path 'mail/.notmuch/*' | sed -n '1~4 p' > $manifest # arithmetic context is to eat extra whitespace on e.g. some BSDs count=$((`wc -l < $manifest`)) @@ -26,8 +26,6 @@ perl -nle 'rename "$_.renamed", $_' $manifest time_run "new ($count mv back)" 'notmuch new' -xargs tar cf backup.tar < $manifest - perl -nle 'unlink $_; unlink $_.copy' $manifest time_run "new ($count rm)" 'notmuch new' -- 2.30.2