🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #215

[PATCH 13/15] t/perf: measure --force-with-lease in p5516

#215
From: Jon Simons
Date: Fri, 09 Oct 2026 19:29
73 lines
7669 bytes
Extend p5516 with rows that push the same delete refspecs plus one
explicit --force-with-lease=<refname>:<expect> per refspec.

The new rows are used to demonstrate a speedup in a subsequent commit.

Numbers as of this commit
(`./p5516-push-delete-refspec.sh -r create,lease`):

  Test                        this tree
  -------------------------------------------
  5516.16: empty:lease:1      0.12(0.06+0.10)
  5516.19: empty:lease:10     0.17(0.10+0.10)
  5516.22: empty:lease:100    0.45(0.38+0.10)
  5516.25: mirror:lease:1     0.15(0.09+0.10)
  5516.28: mirror:lease:10    0.18(0.12+0.10)
  5516.31: mirror:lease:100   0.52(0.42+0.10)

Signed-off-by: Jon Simons <jon@jonsimons.org>
---
 t/perf/p5516-push-delete-refspec.sh | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/t/perf/p5516-push-delete-refspec.sh b/t/perf/p5516-push-delete-refspec.sh
index 0e425193e5..a1e3f74bf7 100755
--- a/t/perf/p5516-push-delete-refspec.sh
+++ b/t/perf/p5516-push-delete-refspec.sh
@@ -6,6 +6,9 @@ Measure client-side matching of explicit delete refspecs with "git push
 --dry-run" against a server that advertises lots of refs.  An empty client
 (no local refs) and a mirror client (full local copy of the server refs)
 are tested pushing 1, 10, and 100 refspecs each.
+
+A second set of rows measures one --force-with-lease per refspec for
+timing those paths.
 '
 . ./perf-lib.sh
 
@@ -24,6 +27,8 @@ test_expect_success 'create server with many refs and two clients' '
 	git -C client_mirror config --unset remote.origin.mirror
 '
 
+oid=$(git -C server rev-parse HEAD)
+
 for mode in empty mirror
 do
 	client=client_$mode
@@ -39,4 +44,24 @@ do
 	done
 done
 
+for mode in empty mirror
+do
+	client=client_$mode
+	for nr_refspecs in 1 10 100
+	do
+		test_expect_success "create $mode lease refspecs: $nr_refspecs" '
+			test_seq -f ":refs/heads/b%d" $nr_refspecs >refspecs
+		'
+
+		test_expect_success "create $mode leases: $nr_refspecs" '
+			test_seq -f "refs/heads/b%d:'"$oid"'" $nr_refspecs |
+			sed "s/^/--force-with-lease=/" >leases
+		'
+
+		test_perf "$mode:lease:$nr_refspecs" '
+			git -C '"$client"' push --dry-run origin $(cat refspecs) $(cat leases)
+		'
+	done
+done
+
 test_done
-- 
2.55.0
Technical Details
Message-ID: <20261009192953.81794-14-jon@jonsimons.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-71636-linux-kernel-git=dewy.ru
References: <20261009192953.81794-1-jon@jonsimons.org>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-71636-linux-kernel-git=dewy.ru
From: jon@jonsimons.org (Jon Simons)
Newsgroups: linux.kernel.git
Subject: [PATCH 13/15] t/perf: measure --force-with-lease in p5516
Date: Fri,  9 Oct 2026 15:29:51 -0400
Organization: Usenet Network
Message-ID: <20261009192953.81794-14-jon@jonsimons.org>
References: <20261009192953.81794-1-jon@jonsimons.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1181511"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:u9wzdc5Y82Gq3LlaXwndF2wkKw8= sha256:sZ0U3uC4MpW+bXbidTjrR2rz2AmVQtNUrCkKd+Qx+IQ=
	sha1:vqiL1niypxA4sjedn07vdrq5l50= sha256:ATfLSR6fumP/JWnC5QG1j+onPu//dO0K7d4xACfTH+4=
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 81D3510F7CB; Fri,  9 Oct 2026 22:40:58 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.05
X-Spam-Status: No, score=-3.05 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key)
	header.d=jonsimons.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id xM-erb6RJzi0;
	Fri,  9 Oct 2026 22:40:55 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=git+bounces-71636-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=jonsimons.org
X-Received: from tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 8510210F777; Fri,  9 Oct 2026 22:40:52 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by tor.lore.kernel.org (Postfix) with ESMTP id 7158D302DD; Fri,  9 Oct 2026 19:37:57 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 8B7744F3903;
	Fri,  9 Oct 2026 19:37:26 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (1024-bit key) header.d=jonsimons.org header.i=@jonsimons.org header.b="c+hoXhqd"
X-Received: from smtp90.iad3b.emailsrvr.com (smtp90.iad3b.emailsrvr.com [146.20.161.90])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id D09874F4CF0
	for <git@vger.kernel.org>; Fri,  9 Oct 2026 19:37:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=146.20.161.90
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791574644; cv=none; b=IqWVAsrlvW9lrrab7oM4UAMsoQSKWDelU7xeXi48hjdTGMH9p9HizWBYrTBGtTJZd02dCaVlwo+oEZTsi61eemEm/b8H9l6OvVgxgyVVKZCchcySWbxGN0groAjSwBB9jLR6BwCyb3GXlGekNFR4NNNVoLpKrH2kpAl2yj4pxWE=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791574644; c=relaxed/simple;
	bh=ORAwWrf52xXXQLFpfSKEmFWHeS4OCDV76yH9I46XlOc=;
	h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References:
	 MIME-Version; b=WWZ3XY8mj9/p+IUXyDx/sA6ihDfMpzgoKnnby4s1hCbYHm0AAklaS2uqXN3rvu6De0pCY23KCkpx83hNPAdaxu/MRFnyzLeP5hNi5uNbPL5u6MEyiTAES8Ay4KeuAoyDxvLVD7y4H4InAeKM7jdQsnPt9BaZzgzG9cs5spXWlcA=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=jonsimons.org; spf=pass smtp.mailfrom=jonsimons.org; dkim=pass (1024-bit key) header.d=jonsimons.org header.i=@jonsimons.org header.b=c+hoXhqd; arc=none smtp.client-ip=146.20.161.90
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=jonsimons.org
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=jonsimons.org
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=jonsimons.org;
	s=20200911-u7gnnm7o; t=1791574224;
	bh=ORAwWrf52xXXQLFpfSKEmFWHeS4OCDV76yH9I46XlOc=;
	h=From:To:Subject:Date:From;
	b=c+hoXhqdGUYk1EWkQM+x/GZKjhyAschww/Y8AxGIU7NgbhI4ehhpw8JEcFfJmBZac
	 cpK01HJ72SxxNM2YPu0aGbEUdg1Odo2sMhO9P+EwZxH5xlH00lCAnOUwaHmMGSE/gL
	 Mj430E9zqaYUwIXDVUi+hiEwOtS6pErFttLf5dYI=
X-Auth-ID: jon@jonsimons.org
X-Received: by smtp4.relay.iad3b.emailsrvr.com (Authenticated sender: jon-AT-jonsimons.org) with ESMTPSA id CE40720396;
	Fri,  9 Oct 2026 15:30:23 -0400 (EDT)
X-Cc: Jon Simons <jon@jonsimons.org>
X-Mailer: git-send-email 2.55.0
X-In-Reply-To: <20261009192953.81794-1-jon@jonsimons.org>
X-Precedence: bulk
X-Mailing-List: git@vger.kernel.org
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-Classification-ID: 523ad08c-aaf2-41d9-9ffc-58ea03a01763-14-1