From: Patrick Steinhardt <ps@pks.im>
To: git@vger.kernel.org
Subject: [PATCH 1/5] t/perf: fix benchmarks with alternate repo formats
Date: Mon, 31 Mar 2025 08:16:44 +0200 [thread overview]
Message-ID: <20250331-pks-meson-benchmarks-v1-1-b2ace85616a3@pks.im> (raw)
In-Reply-To: <20250331-pks-meson-benchmarks-v1-0-b2ace85616a3@pks.im>
Many of our benchmarks operate on a user-defined repository that we copy
over before running the benchmarked logic. To keep unintentional side
effects caused by on-disk state at bay we skip copying some files. This
includes for example hooks, but also the repo's configuration.
It is quite sensible to not copy over the configuration, as it is quite
easy to inadvertently carry over configuration that may significantly
impact the performance measurements. But we cannot fully ignore the
configuration either, as it may contain information about the repository
format. This will cause failures when for example using a repository
with SHA256 object format or the reftable ref format.
Fix the issue by parsing the reference and object formats from the
source repository and passing them to git-init(1).
Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
t/perf/perf-lib.sh | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index 8ab6d9c4694..1a9a51ca3cc 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -98,6 +98,8 @@ test_perf_create_repo_from () {
source_git="$("$MODERN_GIT" -C "$source" rev-parse --git-dir)"
objects_dir="$("$MODERN_GIT" -C "$source" rev-parse --git-path objects)"
common_dir="$("$MODERN_GIT" -C "$source" rev-parse --git-common-dir)"
+ refformat="$("$MODERN_GIT" -C "$source" rev-parse --show-ref-format)"
+ objectformat="$("$MODERN_GIT" -C "$source" rev-parse --show-object-format)"
mkdir -p "$repo/.git"
(
cd "$source" &&
@@ -114,7 +116,7 @@ test_perf_create_repo_from () {
) &&
(
cd "$repo" &&
- "$MODERN_GIT" init -q &&
+ "$MODERN_GIT" init -q --ref-format="$refformat" --object-format="$objectformat" &&
test_perf_do_repo_symlink_config_ &&
mv .git/hooks .git/hooks-disabled 2>/dev/null &&
if test -f .git/index.lock
--
2.49.0.604.gff1f9ca942.dirty
next prev parent reply other threads:[~2025-03-31 6:17 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-31 6:16 [PATCH 0/5] meson: wire up support for benchmarks Patrick Steinhardt
2025-03-31 6:16 ` Patrick Steinhardt [this message]
2025-03-31 6:16 ` [PATCH 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-10 11:43 ` Toon Claes
2025-04-14 6:50 ` Patrick Steinhardt
2025-04-14 19:20 ` Junio C Hamano
2025-04-15 10:01 ` Patrick Steinhardt
2025-03-31 6:16 ` [PATCH 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-10 11:34 ` Toon Claes
2025-04-14 6:28 ` Toon Claes
2025-04-14 6:50 ` Patrick Steinhardt
2025-03-31 6:16 ` [PATCH 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-10 11:44 ` Toon Claes
2025-04-14 6:50 ` Patrick Steinhardt
2025-04-14 9:07 ` Toon Claes
2025-03-31 6:16 ` [PATCH 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 0/5] meson: wire up support for benchmarks Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-20 10:00 ` Christian Couder
2025-04-22 6:51 ` Patrick Steinhardt
2025-04-14 6:51 ` [PATCH v2 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-20 10:00 ` Christian Couder
2025-04-14 6:51 ` [PATCH v2 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-15 14:36 ` [PATCH v2 0/5] meson: wire up support for benchmarks Junio C Hamano
2025-04-15 18:18 ` Junio C Hamano
2025-04-16 11:00 ` Patrick Steinhardt
2025-04-18 23:02 ` Junio C Hamano
2025-04-22 6:50 ` [PATCH v3 " Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-22 6:50 ` [PATCH v3 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-22 7:27 ` [PATCH v3 0/5] meson: wire up support for benchmarks Christian Couder
2025-04-22 7:53 ` Patrick Steinhardt
2025-04-23 14:44 ` Christian Couder
2025-04-24 4:31 ` Patrick Steinhardt
2025-04-24 6:28 ` Christian Couder
2025-04-24 11:13 ` Junio C Hamano
2025-04-24 13:49 ` Patrick Steinhardt
2025-04-23 14:12 ` Toon Claes
2025-04-25 7:28 ` [PATCH v4 " Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-25 7:57 ` Christian Couder
2025-04-25 8:01 ` Patrick Steinhardt
2025-04-25 8:09 ` Christian Couder
2025-04-25 8:27 ` Patrick Steinhardt
2025-04-25 7:28 ` [PATCH v4 5/5] meson: wire up benchmarking options Patrick Steinhardt
2025-04-25 8:06 ` [PATCH v4 0/5] meson: wire up support for benchmarks Christian Couder
2025-04-25 8:26 ` Patrick Steinhardt
2025-04-25 8:33 ` Christian Couder
2025-04-28 7:30 ` [PATCH v5 " Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 1/5] t/perf: fix benchmarks with alternate repo formats Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 2/5] t/perf: use configured PERL_PATH Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 3/5] t/perf: fix benchmarks with out-of-tree builds Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 4/5] meson: wire up benchmarks Patrick Steinhardt
2025-04-28 7:30 ` [PATCH v5 5/5] meson: wire up benchmarking options Patrick Steinhardt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250331-pks-meson-benchmarks-v1-1-b2ace85616a3@pks.im \
--to=ps@pks.im \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).