From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id uDyZNXpZhGDwLwEAgWs5BA (envelope-from ) for ; Sat, 24 Apr 2021 19:46:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id eI42MXpZhGAHCwAA1q6Kng (envelope-from ) for ; Sat, 24 Apr 2021 17:46:34 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (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 0C5612587E for ; Sat, 24 Apr 2021 19:46:34 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 693E8271E4; Sat, 24 Apr 2021 13:46:28 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id 23C31271D8 for ; Sat, 24 Apr 2021 13:46:26 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 0E0205FBEA; Sat, 24 Apr 2021 13:46:26 -0400 (EDT) Received: (nullmailer pid 2159914 invoked by uid 1000); Sat, 24 Apr 2021 17:46:24 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH] perf-test: add test for reindexing after removal/renaming msgs Date: Sat, 24 Apr 2021 14:46:18 -0300 Message-Id: <20210424174618.2159866-1-david@tethera.net> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Message-ID-Hash: BWU544KO7WQPTAOIWIBS73ORHP2FH7ST X-Message-ID-Hash: BWU544KO7WQPTAOIWIBS73ORHP2FH7ST 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=1619286394; 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=xVa342al7zDABtuZyrNGOtdvNj+4QIo+rJ3WFHwqbaA=; b=g2X1G74oLwRWNRPbi7QjmC7UZ0CvuRY5DrrhFidvtOc/WdyDsDg3Z+VaSLJpsBFbvmDkdT BVUXAjuT0fs0M+aOHuyc+wHKV/o37ouvhDB9PwnSc0w+4oHFRjX4PiQdXvjBAQMpwdY/eg LL9UMfFeImipXRQH8+TYJABp6lJ0PSxh6IEQEASdstCZGCHHkfZOlxTSzWM9/RCT0UnWc0 fwF9hzrv79R87nbhy9X1+U6l6T/qKDgAThgP6DNIIxIuPT39ciN9RuelzFtgZdRq39pDJq T6sBOzbIRueDBwmoComeqiZgGfqby1RqAEbDye6gp5xMzSaA5u3op0LCKAyYiQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1619286394; a=rsa-sha256; cv=none; b=IaSFONpBZxC6sbxnq48qgAnLZ8paMX1SML29u0goow57vjfNgs+12kpPRNYWHyhFwCk2+L fngqTpGRMgUzynUSjrYyC8iDi/CKzyVFZZvQ6X9kj8PNDr3OwjNBqRCDlQRpoSEguPR/AT A+SgfBqyxCuWzmOo0Z0PmHQ7EqlmS49HdmfxfSkUF/JdMqX5q2J3ntJeofZMWFQS7Uucg6 gqNy2Skwf459Ym8/45uqP8lrmchInJ6Cq6sztIVD3PRrs3iXeOXvfZq50bbfOEhuC4IFE+ s29UxOBmdPqgffnZi6t1QvTq9O/1NVhHSQIfhDLOxV9Tlj+MjSjNNQipST7h0A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -1.12 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 0C5612587E X-Spam-Score: -1.12 X-Migadu-Scanner: scn0.migadu.com X-TUID: FaZTNo9m9mb6 At this point it is a bit tricky to measure the performance increase from the new message deletion code, since the same commit (9ad19e4) that improved the performance also seems to have fixed a bug with an uncaught Xapian exception triggered by this test. --- performance-test/T03-reindex.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/performance-test/T03-reindex.sh b/performance-test/T03-reindex.sh index 8db52a33..afa11df8 100755 --- a/performance-test/T03-reindex.sh +++ b/performance-test/T03-reindex.sh @@ -10,4 +10,32 @@ time_run 'reindex *' "notmuch reindex '*'" time_run 'reindex *' "notmuch reindex '*'" time_run 'reindex *' "notmuch reindex '*'" +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`)) + +perl -nle 'rename $_, "$_.renamed"' $manifest + +time_run "reindex ($count mv)" "notmuch reindex '*'" + +perl -nle 'rename "$_.renamed", $_' $manifest + +time_run "reindex ($count mv back)" "notmuch reindex '*'" + +xargs tar cf backup.tar < $manifest + +perl -nle 'unlink $_; unlink $_.copy' $manifest + +time_run "reindex ($count rm)" "notmuch reindex '*'" + +tar xf backup.tar + +time_run "reindex ($count restore)" "notmuch reindex '*'" + +perl -nle 'link $_, "$_.copy"' $manifest + +time_run "reindex ($count cp)" "notmuch reindex '*'" + time_done -- 2.30.2