Article View: linux.kernel.git
Article #1260[PATCH v5 2/6] p5413: add perf tests for connectivity check
From: "Kristofer Karlsson via GitGitGa...
Date: Fri, 23 Oct 2026 13:11
Date: Fri, 23 Oct 2026 13:11
158 lines
15532 bytes
15532 bytes
From: Kristofer Karlsson <krka@spotify.com>
Add benchmarks for the rev-list connectivity check. Each fixture
varies one dimension: total tree size, incoming commit count, or
files changed per commit.
Signed-off-by: Kristofer Karlsson <krka@spotify.com>
---
...enerate-repo-p5413-connectivity-check.perl | 44 ++++++++++
t/perf/p5413-connectivity-check.sh | 85 +++++++++++++++++++
2 files changed, 129 insertions(+)
create mode 100644 t/perf/generate-repo-p5413-connectivity-check.perl
create mode 100755 t/perf/p5413-connectivity-check.sh
diff --git a/t/perf/generate-repo-p5413-connectivity-check.perl b/t/perf/generate-repo-p5413-connectivity-check.perl
new file mode 100644
index 0000000000..bfa25f60fc
--- /dev/null
+++ b/t/perf/generate-repo-p5413-connectivity-check.perl
@@ -0,0 +1,44 @@
+#!/usr/bin/perl
+#
+# Generate a fast-import stream for p5413 connectivity check benchmarks.
+#
+# Usage: generate-repo-p5413-connectivity-check.perl
+# <dirs> <files_per_dir> <commits> [<hot_dirs>] [<files_per_commit>]
+#
+# Creates one initial commit with dirs*files_per_dir files, then
+# <commits> additional commits each modifying <files_per_commit>
+# files in directories chosen round-robin from 1..<hot_dirs>.
+
+use strict;
+use warnings;
+
+my ($nd, $nf, $nc, $hot, $fpc) = @ARGV;
+$hot = $nd if !$hot || $hot > $nd;
+$fpc = 1 if !$fpc;
+
+sub data {
+ printf "data %d\n%s\n", length($_[0]), $_[0];
+}
+
+# Initial tree: one commit with nd*nf files.
+printf "commit refs/heads/main\n";
+printf "committer perf <perf\@test.com> now\n";
+data("initial");
+for my $d (1..$nd) {
+ for my $f (1..$nf) {
+ printf "M 100644 inline d-%04d/f-%03d\n", $d, $f;
+ data(sprintf "%03d%03d", $d, $f);
+ }
+}
+
+# Subsequent commits (auto-chained by fast-import).
+for my $i (1..$nc) {
+ printf "commit refs/heads/main\n";
+ printf "committer perf <perf\@test.com> now\n";
+ data(sprintf "change-%03d", $i);
+ for my $j (0..$fpc-1) {
+ my $d = (($i + $j) % $hot) + 1;
+ printf "M 100644 inline d-%04d/f-001\n", $d;
+ data(sprintf "c%d-%d", $i, $j);
+ }
+}
diff --git a/t/perf/p5413-connectivity-check.sh b/t/perf/p5413-connectivity-check.sh
new file mode 100755
index 0000000000..9e968d0106
--- /dev/null
+++ b/t/perf/p5413-connectivity-check.sh
@@ -0,0 +1,85 @@
+#!/bin/sh
+
+test_description='performance of connectivity check
+
+Benchmark the rev-list connectivity check, avoiding pack transfer
+noise.
+
+Each repository has a flat tree of many directories with 100 files
+in each. Three axes are scaled independently: tree size, commit
+count, and files changed per commit.'
+
+. ./perf-lib.sh
+
+test_perf_fresh_repo
+
+generate="$TEST_DIRECTORY/perf/generate-repo-p5413-connectivity-check.perl"
+
+# $1=dirs $2=files_per_dir $3=commits $4=hot_dirs (optional, default=all)
+# $5=files_per_commit (optional, default=1)
+test_perf_conn () {
+ local nd="$1" nf="$2" nc="$3" hot="${4:-$1}" fpc="${5:-1}"
+ local total=$(($nd * $nf))
+ local name="repo-${nd}d-${nf}f-${nc}c-${hot}h-${fpc}fpc"
+ local label="${total} files, ${nc} commits"
+ if test "$hot" -lt "$nd"
+ then
+ label="$label (${hot} hot dirs)"
+ fi
+ if test "$fpc" -gt 1
+ then
+ label="$label (${fpc} files/commit)"
+ fi
+
+ test_expect_success PERL "setup $label" '
+ if test -d '"$name"'
+ then
+ true
+ else
+ git init '"$name"' &&
+ "$PERL_PATH" '"$generate"' '"$nd"' '"$nf"' '"$nc"' '"$hot"' '"$fpc"' |
+ git -C '"$name"' fast-import --date-format=now --quiet &&
+ (
+ cd '"$name"' &&
+ git rev-parse main~'"$nc"' >../'"${name}"'_old &&
+ git rev-parse main >../'"${name}"'_new &&
+ git update-ref refs/heads/main \
+ $(cat ../'"${name}"'_old) &&
+ git repack -ad &&
+ git config gc.auto 0
+ )
+ fi
+ '
+
+ test_perf "$label" --prereq PERL '
+ cat '"${name}"'_new |
+ git -C '"$name"' rev-list \
+ --objects --stdin --not --all --quiet \
+ --exclude-promisor-objects
+ '
+}
+
+# Scaling tree size (10 commits, 10 files/commit).
+test_perf_conn 50 100 10 50 10
+test_perf_conn 500 100 10 500 10
+test_perf_conn 2000 100 10 2000 10
+test_perf_conn 8000 100 10 8000 10
+
+# Scaling commit count (200K files, 10 files/commit).
+test_perf_conn 2000 100 1 2000 10
+test_perf_conn 2000 100 10 2000 10
+test_perf_conn 2000 100 100 2000 10
+test_perf_conn 2000 100 500 2000 10
+test_perf_conn 2000 100 3000 2000 10
+test_perf_conn 2000 100 5000 2000 10
+test_perf_conn 2000 100 10000 2000 10
+
+# Scaling files per commit (200K files, 10 commits).
+test_perf_conn 2000 100 10 2000 1
+test_perf_conn 2000 100 10 2000 10
+test_perf_conn 2000 100 10 2000 100
+test_perf_conn 2000 100 10 2000 500
+test_perf_conn 2000 100 10 2000 1000
+test_perf_conn 2000 100 10 2000 2000
+
+test_done
--
gitgitgadget
Technical Details
Message-ID:
<427b7315a5167f4b5546a08c851a4aa222fcc2f6.1792761119.git.gitgitgadget@gmail.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-73007-linux-kernel-git=dewy.ruReferences:
<pull.2211.git.1789379276.gitgitgadget@gmail.com> <pull.2211.v5.git.1792761119.gitgitgadget@gmail.com>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-73007-linux-kernel-git=dewy.ru
From: gitgitgadget@gmail.com ("Kristofer Karlsson via GitGitGadget")
Newsgroups: linux.kernel.git
Subject: [PATCH v5 2/6] p5413: add perf tests for connectivity check
Date: Fri, 23 Oct 2026 13:11:55 +0000
Organization: Usenet Network
Message-ID: <427b7315a5167f4b5546a08c851a4aa222fcc2f6.1792761119.git.gitgitgadget@gmail.com>
References: <pull.2211.git.1789379276.gitgitgadget@gmail.com>
<pull.2211.v5.git.1792761119.gitgitgadget@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="506561"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:y2/dU13MgCDwZvMr0abV4ryTpfA= sha256:Y8wjmh6eUszC7sg8nT1tk25t5M43aM9KAzPYe/PUFak=
sha1:SXfL7B6w8vBKLfZS4NST9+czlig= sha256:WSHxv47KKdu5aAQhRmDihWkUFBGltcDdJC1TK2uW0a4=
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 AF2A51114B1; Fri, 23 Oct 2026 16:19:21 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.948
X-Spam-Status: No, score=-1.948 tagged_above=-9999 required=6.31
tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25,
MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=gmail.com
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 0rQCI8iTq9NH;
Fri, 23 Oct 2026 16:19:19 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-73007-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id D06E61114B0; Fri, 23 Oct 2026 16:19:10 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id 18A9D3D7E2; Fri, 23 Oct 2026 13:12:14 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1792761132;
b=w5I6KE5fVZnCH0we644QA8n/pnWxnxgBI6icU4WOuZIW7mArhpeuhsREywwwglOSldI0
g4My/6D2plm3rprALXIpeprNcQ0hwcdchnSfsJD56zQr7AB7Abf/9MwH9huDrvW4IVUW5
H3eHUFtaS5SNnlELKDpXi4I3nACzA8iVgLQE7amwtQ5vZItCXZjsDL2fn0/bdFpeGpcGH
ijnSrRqbtpDXJxxrzc2Ig2RBetMSanQLPbXWRdRym1hthsd214Fw0OM032zeK/vRHtzB5
FNDWcphWfTAtji3yw/JQsWp2xedqxhGjV+HLkNVuQ+BCd/HLsNbNc8qf8OOJZGWPJMQ==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792761132;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
Received:Message-Id:In-Reply-To:References:From:Date:Subject:Fcc:
Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
Precedence:MIME-Version:To:Cc;
bh=9/SoSFwXY3w0jifx5GDQGkcEBD7pUsbS3N3CpluRPso=;
b=NMxS3Ds8RUmhYw4vNAnxlFEgVOieLdIlUfw2X1FBfUcXzfTcz9gSHIsBQGJ6BmVMz2gA
5QblO2ELKNuG7tmlfZWNnlKpCRTxp4RanK1rvlIx3NEko58gZkTgj8UUpJBvDlfJzgbDI
6wx/Z3sL4vf9ZjXUZqJe9d2hHxD3lngYErQPOsBEkT3nRwBqgxO4Ohz0E69gXzm8WCT1y
/5e10iKonRvho6mqFdjmnWjW9bL2+Z1tQBXnpAlHMQCGWWor6eI6mgt5L1EVKZadScIxN
ziCY9hdZl14FKx+YngiQZpw7bZ4d1He1UzwQMlhLod90NLeoNCX6CNDlYo4UQPOdAIA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=MTNYQzzt;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 977E0606A32A;
Fri, 23 Oct 2026 13:12:12 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=MTNYQzzt
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=74.125.224.47
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1792761125;
b=I9cd0WncQzBV/s24GQCl0sf84ppmQb+2pNxNDsVURLVq2sQsmjcSBVVxfaLH9CCvNoOl
6Gs2mc0oItd0qLCBboJ2o9Xwmx50pOz4NdO2F/bfPqNf9Ds8cSseMLiYWXGA47My7XDP4
h6/iH88qGrY7BRPQ+KIQW40QWs07hMUhih++D06pBBMH0Hg+5rR9LBAWoGQEQp9r7quWZ
8rIG+Cfg5FPvwN5w1LliCi9JcJEene4SzEBR3Unv7u+HtHbPC1saPD8+tgun6qbBtOKuz
nA+m9oZLfyKwSPhpTqyGwEqKcj6G0Nv0aNEngw+7wJ+LvlJUoezuzUH7KjoE/p5KQ+w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1792761125;
h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
X-Gm-Message-State:X-Gm-Gg:X-Received:Received:Message-Id:In-Reply-To:
References:From:Date:Subject:Fcc:Content-Type:
Content-Transfer-Encoding:MIME-Version:To:Cc;
bh=9/SoSFwXY3w0jifx5GDQGkcEBD7pUsbS3N3CpluRPso=;
b=dZwZSw88pMb6YkbilyiFNR6GpRKqD7rNTP0zvy9fxDu4MGL86vgSoHjFGXSHsUKEqcxE
/ejqHk1em9KOpvHheCRPZPUXsbJ/iuRy3fGGmXXJa3Yda8Dy89C5jzHNDxosoDdUjdADS
Hf0wgWH8SAKkaHssc4fxmLXHOhuzPyovKfyMsDWzX25NBeUXTaGS0ggtQtw5KybcEsDnx
Ji/g3UKCF7TwBgeMRLhpwzmjWL/3s9TEaQQ1o55wmg0oIY8fI2KIGuiaWj3wd/VKA+8OX
DTknrWSBZDDDfKxUZ0T4h3Obe13YBxMq+rLPVMhZJqB3JkR9cjGIjan+OjWN/QDVmqw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org;
dmarc=pass header.from=gmail.com;
spf=pass smtp.mailfrom=gmail.com;
dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=MTNYQzzt;
arc=none smtp.remote-ip=74.125.224.47
X-Received: from mail-yx1-f47.google.com (mail-yx1-f47.google.com [74.125.224.47])
(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
(No client certificate requested)
by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26E29606A328
for <git@vger.kernel.org>; Fri, 23 Oct 2026 13:12:05 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 26E29606A328
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-yx1-f47.google.com with SMTP id 956f58d0204a3-676804a3a22so893134d50.1
for <git@vger.kernel.org>; Fri, 23 Oct 2026 06:12:05 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20251104; t=1792761124; x=1793365924; darn=vger.kernel.org;
h=cc:to:mime-version:content-transfer-encoding:content-type:fcc
:subject:date:from:references:in-reply-to:message-id:from:to:cc
:subject:date:message-id:reply-to:content-type;
bh=9/SoSFwXY3w0jifx5GDQGkcEBD7pUsbS3N3CpluRPso=;
b=MTNYQzzt23gS2fZVbBOcOhRTSRiMfgr+vhXpWdYkfwSTM3nw3hUEadQHYQvLY5c/HD
+fNUZhi7pW9zKv2K7O6lzqXCkBs5wxj895qdY6jM3TQp/owsOyd3hbKeWJ8zDxnVAxXm
5JCww8SinIRNE80PGfgH6RlD99f1x/Gw0sG95SJ8SruUcgJoT6aCcfwR9EdRHRh/fiL7
Z/5rSAvco43rT7TZO8IfDVTLylKgpqt+XEbqNHRIoRgUS9ssRhfaFia6M2SVA+OGq4O4
NYJsTFIhzwnTxBevge9WWSd/wIKJP6DL5F2IAmbRi9+6NBE39KDStFpxSWYz0BjpK/UJ
2SYg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1792761124; x=1793365924;
h=cc:to:mime-version:content-transfer-encoding:content-type:fcc
:subject:date:from:references:in-reply-to:message-id:x-gm-gg
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
:content-type;
bh=9/SoSFwXY3w0jifx5GDQGkcEBD7pUsbS3N3CpluRPso=;
b=oQ5CJuBpcV/VB6bA7FZt/toMd0a35FHYYDXPhns/kjkYt6VILZSf/9geyDLIbvTBRI
kfOjlCjDpurnWbWKf66Yw5PAm6RR9pHiXsBCFP5m4mfJyjTNZekMM7eSQl+5xfBRbFna
Si4afw21BOKtsge4j0RtkdO1Vk+I8tIOI17rzRzcCbOAIiiJEtKIM4rHslv72tuCUEqX
FW9fiEBtfiSjEBTDt/SLfIVxsjmgcyjdU8iey7EchuJk2SoTAr23J/gcirfA+1QeYsD9
CqDjjsodCUpKc0NittkJ1NvYrlzt8kSRycXanFbBidJpgXOTU3jJL5eCfwsAycQD0k6L
jWAw==
X-Gm-Message-State: AFq9FYJKN4+RJXxte2pW3Yea3FaX6+8/WzChagyptd/c8ZqGSSnmnxkX
4KIdyiYpDy190rgjYeiIKPKq+hpABZvObGe+snsbDSRwRG2RqcRwz1CryO9+6+mk
X-Gm-Gg: AYBFou2nS3gSPh/0WKyqNe7qk156thNh7zcpc2fzCeLo++CoE5EMThi3LWShGPqb6rA
DRWAt9TFl1DhFc1h1x0dqsixlp+3JKbkjQg/yL3ABi4Pd9F75taf4QDsv8Av2NEjPuij9c6nl91
TRIB1TlnXntgZLsFFdw5h7frXzAt8E+b9hNuqDuK7bUbft0T6YewPNHtx1kNOvCcJ9vphvwyQ/1
zAQZ2FH6yy2E3NFrjyG1meK23+w3dEY9QnTMsNrzQ0DT2RvfT92WnBhZlGQD3MaNb/o4xnHUxX7
C5vctUZOz4Lt1K6zvuWUhe/PxrN/nx7vhELvruONTzrbAvYTcvBfumBnKWw+iCe1WFetfPqz9Uv
/dPCYrz7uoLhMdxT/vR5rK3GhAPEERBya5JifeMeb8m+MdBzGaVMJXdrVHVcUFlkd5Ilv/yrrJm
D0q4UI0L54B5pz+OlwVbxp6aQP1B/t+Pr0OOVbvSy074sW7kKOc64lR02m+Hgk0Sbk83TwylY+u
YoqQCANUkMs9OQCzng6t8a0v1yey5A567hgbSxDia9A/t4ksc3JJ6kvnCM=
X-Received: by 2002:a05:690e:4081:b0:679:42b4:affd with SMTP id 956f58d0204a3-67a35bb8c75mr1718361d50.21.1792761124202;
Fri, 23 Oct 2026 06:12:04 -0700 (PDT)
X-Received: from [127.0.0.1] ([52.188.86.148])
by smtp.gmail.com with ESMTPSA id 956f58d0204a3-67a33dbac4asm1309080d50.0.2026.10.23.06.12.03
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Fri, 23 Oct 2026 06:12:03 -0700 (PDT)
X-In-Reply-To: <pull.2211.v5.git.1792761119.gitgitgadget@gmail.com>
X-Fcc: Sent
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-Cc: Kristofer Karlsson <krka@spotify.com>,
Kristofer Karlsson <krka@spotify.com>