From patchwork Mon Apr 14 06:51:11 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 14049839 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (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 7C6B81ACED9 for ; Mon, 14 Apr 2025 06:51:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613478; cv=none; b=E58GAVom8qz25sPy+6SybTBTFfaYLpUOQ5/+eDCF5cjmRsZ2QLSlrXlPs3CsB/Mp6SQIKK/GyztuETaFUWCZUrDSIVgLz8+j11UaJWaS5FycN8+n0Z8zTFP3S0abfsiELLzlyss0HcxB9FxY7Sy/0EmuZ5Hc5L4qHPGqBIJDAes= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613478; c=relaxed/simple; bh=egd9m/43Eujd06A4VKF4f3+k1eoHSZLQYXtYfYwlgcc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To; b=DDMIAYYlPG9+nXTncQ7Mmt2VmeGRID64fwVgwjiM1dVn150PgeA/91TvAkH2UQ/jGh3hcW9wk98GCZGgG10jaAyOx5RcRhCMn7ipvSa0idkavKxquI3hr1RKgnuEx13tjhMmD/pFNa+GkqfF6tUwl7jcJ2wwq8PGm+MrQ519i1w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=dlKfK2Yg; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=qr5vfkNE; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="dlKfK2Yg"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="qr5vfkNE" Received: from phl-compute-04.internal (phl-compute-04.phl.internal [10.202.2.44]) by mailfhigh.stl.internal (Postfix) with ESMTP id D00E925400CB for ; Mon, 14 Apr 2025 02:51:15 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Mon, 14 Apr 2025 02:51:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1744613475; x=1744699875; bh=eIZFbJiiK8xbvPYebv/ZfLvD6Z/ZGqNC1BgOq9SbTNQ=; b= dlKfK2YgmewSRiQMp6lYcyU/4oWvAe9TAIg5Zxvq9R6HjYjhd64HUp/hcEjGW44H yuTEYZZvCqN6E0L2lZmbws8W91Qxjc/tsEh7zssKElzu2vJkmsFpLs7z+DxIG7lQ bPEVFD93PdNM0IFSyXwjpvYGHPCRenLrFGyRJW57CcVeqRU7wvhkr6OcR/7Kb+bG 1YbAak1asWiY52hHqIJ6McbLLGzuHnK8IlzbQhCM+FG4O9ZxyHKb9qb1C+Syv2Nb HVczwEuLXGSAlQh6UR/YPbOMYfIB2pP24G+Ft5svupZA9nfXiTAqXYIpCtEOZnD9 XfsQuquy5RAigxC2bum0sA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1744613475; x=1744699875; bh=e IZFbJiiK8xbvPYebv/ZfLvD6Z/ZGqNC1BgOq9SbTNQ=; b=qr5vfkNEqj7f+qgKu 2q11sO+oFwpwg7zMiXWiaBvm3u5ph69ZjONMLZLK+41N+Y5WJr5Jl5/B72KQUui4 MQgRJbHYBGX7gHLiJVPb8IECpGb6lPnvslsm3gs4RA9tsTvCLjVzEHRa3BRp6uFG 60S1lFfYUybkIZp5qrgx+MT+7Gs/5I0yXDbcJj1mnnZ64BPO10RKkIMaASSxH0u6 wCp2nz9Q8fm7D+qyHiGUkq5PykH4qMXVVuHIImI2aZV8tduX+utCXEUYbFPsLGN9 c3Anse9/+qSic7Sfjc+9YRkvsDhiZmTiBGiAn6yCakBjz4c+P2V/QNEm6zz5mesb rB+dw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvudelkeejucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhff fugggtgffkfhgjvffosehtjeertdertdejnecuhfhrohhmpefrrghtrhhitghkucfuthgv ihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrhhnpeelueduue eljeelhfejueeffefgtedtvedtfeeffeevleelueetffegteduffegleenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhmpd hnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgihht sehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 14 Apr 2025 02:51:15 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 7b1f7f4b (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 14 Apr 2025 06:51:14 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 14 Apr 2025 08:51:11 +0200 Subject: [PATCH v2 1/5] t/perf: fix benchmarks with alternate repo formats Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250414-pks-meson-benchmarks-v2-1-04377080a167@pks.im> References: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> In-Reply-To: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> To: git@vger.kernel.org X-Mailer: b4 0.14.2 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 --- 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 From patchwork Mon Apr 14 06:51:12 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 14049840 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (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 DF5171B041E for ; Mon, 14 Apr 2025 06:51:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613479; cv=none; b=PYDyHfKucYx4oZw7FyOguwth3FvVWM3uLPsri/9bk7rqQHDxHTl2/KJfUkzVhNu/Mp/Fs52U3prs0YNcuncAibsEaMClqLo2X5v8w4iu7/sG9s/UcfjC+YNL4jnZejMR0LePLuLfCwNbFUgLbwaNTnRVXXAzkCgKr0RMgmlvPh4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613479; c=relaxed/simple; bh=p45euj2zT55CptsN7FOjhIkoGTMivqNz1n0ktvYEaC0=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To; b=lN+ujDmicJAlT+Q8Si4sJHNcf6wQg7KdBp9NGwy6eQhGjq1CCflulk7krJHx/j0RNwAOm/Ywq2X+C+Pg1PjVqMiTfltQ7cEdITQib4Ch7L7ytmUtaACVXbk89XtgbiEfy44/e6rsZbDl/esUpo8jugaURRleS3ABJCKs4BsZ3gc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=oBWwXQqa; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=uxqy9qOb; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="oBWwXQqa"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="uxqy9qOb" Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfhigh.stl.internal (Postfix) with ESMTP id D5A2825400AD for ; Mon, 14 Apr 2025 02:51:16 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Mon, 14 Apr 2025 02:51:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1744613476; x=1744699876; bh=Pe4py9shOCNcCcSB5rV1c1mRpexZp5AI+99EoAe21Qo=; b= oBWwXQqaNVa7ktQAZ0UdU0Sbkc5JP7qC+OVCtny80lhXWHjz21qpT2WrWoayrCzP XEl0yk6eLmfT1RObSf7R9+YmKpeuBw7HYapplhY1ju36syshJ2wXog0nc1jRJWrB BgSYwcT5rsHdHopym75OKDlykfcbLG9aYpMskrutJal8koVwV/Ss8mTDPEMx6FkJ mm1ukRphuotBYpUFKY2lRR0D4BG2gJnfRyDN5UjhwtfpUEBVGFYzkSI1OmzZ5fAw abrcLr2bzavVcj/WBvRH6FFslNndYfzwXAAug9gmhNA65GML9//ZuS/j5LUO/mil LZzh7tbk40ihf5hrGScq9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1744613476; x=1744699876; bh=P e4py9shOCNcCcSB5rV1c1mRpexZp5AI+99EoAe21Qo=; b=uxqy9qOb4ulISaXlw BTODqBfngh++bo+OU6LCh0U+/CK/GBfUBqCjjdxdl0cOS3LNIMQYYAJuPmGaj/76 Wt+YLdCTnYQnBF2vV+IgrH4wV1qq4XC3oyyhsUop8kXqQWr1ixKvdc5lY+BYV00B juqD21StoxliP7XNZ/T0doz2tWGi6EacO2nZotcZTtrvHdfg4CSa8OdkBqfTzkkv OYnZyRguB6IR/YmB82g0nHLA6bRBvvCUtKi1YJ/k+28MEink3agfc8diQiGeAoHG h2kW7ba0ZLjbukhzOfnVvbe/2iKSB2Pqo9TQdx8wcsxWjoCYodjnS2GrX303HY1C Gmv5w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvudelkeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhff fugggtgffkfhgjvffosehtjeertdertdejnecuhfhrohhmpefrrghtrhhitghkucfuthgv ihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrhhnpeelueduue eljeelhfejueeffefgtedtvedtfeeffeevleelueetffegteduffegleenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhmpd hnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgihht sehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 14 Apr 2025 02:51:16 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 28f0e80f (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 14 Apr 2025 06:51:15 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 14 Apr 2025 08:51:12 +0200 Subject: [PATCH v2 2/5] t/perf: use configured PERL_PATH Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250414-pks-meson-benchmarks-v2-2-04377080a167@pks.im> References: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> In-Reply-To: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> To: git@vger.kernel.org X-Mailer: b4 0.14.2 Our benchmarks use a couple of Perl scripts to compute results. These Perl scripts get executed directly, and as the shebang is hardcoded to "/usr/bin/perl" this will fail on any system where the Perl interpreter is located in a different path. Our build infrastructure already lets users configure the location of Perl, which ultimately gets written into the GIT-BUILD-OPTIONS file. This file is being sourced by "test-lib.sh", and consequently we already have the "PERL_PATH" variable available that contains its configured location. Use "PERL_PATH" to execute Perl scripts, which makes them work on more esoteric systems like NixOS. Furthermore, adapt the shebang to use env(1) to execute Perl so that users who have Perl in PATH, but in a non-standard location can execute the script directly. Signed-off-by: Patrick Steinhardt --- t/perf/aggregate.perl | 2 +- t/perf/perf-lib.sh | 4 ++-- t/perf/run | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl index 575d2000cc1..1791c7528a9 100755 --- a/t/perf/aggregate.perl +++ b/t/perf/aggregate.perl @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!/usr/bin/env perl use lib '../../perl/build/lib'; use strict; diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index 1a9a51ca3cc..4173eee4def 100644 --- a/t/perf/perf-lib.sh +++ b/t/perf/perf-lib.sh @@ -276,7 +276,7 @@ test_perf_ () { else test_ok_ "$1" fi - "$TEST_DIRECTORY"/perf/min_time.perl test_time.* >"$base".result + "$PERL_PATH" "$TEST_DIRECTORY"/perf/min_time.perl test_time.* >"$base".result rm test_time.* } @@ -324,7 +324,7 @@ test_at_end_hook_ () { if test -z "$GIT_PERF_AGGREGATING_LATER"; then ( cd "$TEST_DIRECTORY"/perf && - ./aggregate.perl --results-dir="$TEST_RESULTS_DIR" $(basename "$0") + "$PERL_PATH" ./aggregate.perl --results-dir="$TEST_RESULTS_DIR" $(basename "$0") ) fi } diff --git a/t/perf/run b/t/perf/run index 486ead21980..073bcb2afff 100755 --- a/t/perf/run +++ b/t/perf/run @@ -192,10 +192,10 @@ run_subsection () { if test -z "$GIT_PERF_SEND_TO_CODESPEED" then - ./aggregate.perl --results-dir="$TEST_RESULTS_DIR" $codespeed_opt "$@" + "$PERL_PATH" ./aggregate.perl --results-dir="$TEST_RESULTS_DIR" $codespeed_opt "$@" else json_res_file=""$TEST_RESULTS_DIR"/$GIT_PERF_SUBSECTION/aggregate.json" - ./aggregate.perl --results-dir="$TEST_RESULTS_DIR" --codespeed "$@" | tee "$json_res_file" + "$PERL_PATH" ./aggregate.perl --results-dir="$TEST_RESULTS_DIR" --codespeed "$@" | tee "$json_res_file" send_data_url="$GIT_PERF_SEND_TO_CODESPEED/result/add/json/" curl -v --request POST --data-urlencode "json=$(cat "$json_res_file")" "$send_data_url" fi From patchwork Mon Apr 14 06:51:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 14049841 Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) (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 BF3AE1B81C1 for ; Mon, 14 Apr 2025 06:51:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.145 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613481; cv=none; b=Zzps7vnDs2xrGddV92622rdMbHY0Re0RUell+22cttqZ2FaEJbO/pHRW52OIp2Rq05uxKhPkuQIV0HN4ciDoMNZZIoqkRJMX9Lu0Sqs39ogpzGLEYQ7TOeRyr+nfikuDK2pdny/Eoo+9B3ZDxSwtQgG1aesIVpWSDAkS/2p0a/E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613481; c=relaxed/simple; bh=bsCO1secU1xo+GV1d9ghY+2+whmnn5f6c9nHeipdLmQ=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To; b=WtmLIAAplpvy9R99Aw5vyXnCsrAuk9LeAn6vuSgd0WVueWcnPkfH2Uuxj4o8aAKCFK4IXx3CtdTL3aVLgAE8FJ9kM7FHze0UUJUgqxOwy+2eq6Eus0uwYTRanb32qM8T22rAfpZJXemSdmHZTeuIXph+hVrco9FYCYEYdcDuQPI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=ojAAhGvn; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=qO89C088; arc=none smtp.client-ip=202.12.124.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="ojAAhGvn"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="qO89C088" Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.stl.internal (Postfix) with ESMTP id DAD7B1140105 for ; Mon, 14 Apr 2025 02:51:17 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Mon, 14 Apr 2025 02:51:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1744613477; x=1744699877; bh=0aAM5EQUmmAr43UyPXlzPWBCaiEkv0DNoB7DoBezet0=; b= ojAAhGvn+t8CO9NMl0YUyafX1NwZ+DDcdcigpV+QP98i4yDwlkczfh/NkSdQ5Ji0 ea6fKOkb7gI4YVAjjQpQgeIwlWD+UbAjZnz/GexIHLhYSjYaSrjYnpx1ekG2k7+M PebYRq+3hia/jCxeytnj9j6aRq6PwB57MZTX64JsU9paC24s43A0kxSY+Ao+LVER cJ2e9XRnlpdP1iB55D4GxtCc1K7LxE+PMdrWYg/jGWyo+OLcEf0RtE2fQUYd1WRT kvL4zYlLv+fYn3crEl0bo0X6sotIUhg8Sq5Qp3KNDo7uxsH3f8aupFLyLGKJp3Yn lwz3iA7Q66Z0p7OfZxIThw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1744613477; x=1744699877; bh=0 aAM5EQUmmAr43UyPXlzPWBCaiEkv0DNoB7DoBezet0=; b=qO89C088xtYh5fplM QEtJmuXGSrKBztxdkQHtOH3my/SFMcWRlqTAi3yvC7y/zhSMKJEc1IQYAG0/IDxW I74e4r4SRCUF4UQBLGk+npRbluPAgZYI66jaI2engubryyC1qrj8611oNC8AXQ5U bjfSegMstSIOthhQIMinm0PXr92dF7NXOqkk/FMIwwAmgUxKyhWYNmax3/olZcgT oKwYETBZgw9iBy1xE5wrjvslZZVnxijgIz0XLBRk+DBOzrubU9Ix1/tk7BjthJ71 z2LDI0G106em66+xMal8GJI6Z02KHcpQ5glCKoi0ox9PbW+CO9wba4/XPrG1kSuY Y3o7A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvudelkeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhff fugggtgffkfhgjvffosehtjeertdertdejnecuhfhrohhmpefrrghtrhhitghkucfuthgv ihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrhhnpeelueduue eljeelhfejueeffefgtedtvedtfeeffeevleelueetffegteduffegleenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhmpd hnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgihht sehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 14 Apr 2025 02:51:17 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 1b77ea52 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 14 Apr 2025 06:51:16 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 14 Apr 2025 08:51:13 +0200 Subject: [PATCH v2 3/5] t/perf: fix benchmarks with out-of-tree builds Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250414-pks-meson-benchmarks-v2-3-04377080a167@pks.im> References: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> In-Reply-To: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> To: git@vger.kernel.org X-Mailer: b4 0.14.2 The "perf-lib.sh" script is sourced by all of our benchmarking suites to make available common infrastructure. The script assumes that build and source directory are the same, which works for our Makefile. But the assumption breaks with both CMake and Meson, where the build directory can be located in an arbitrary place. Adapt the script so that it works with out-of-tree builds. This prepares us for wiring up benchmarks in Meson. Signed-off-by: Patrick Steinhardt --- t/perf/perf-lib.sh | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh index 4173eee4def..5406557b7ca 100644 --- a/t/perf/perf-lib.sh +++ b/t/perf/perf-lib.sh @@ -25,7 +25,29 @@ TEST_OUTPUT_DIRECTORY=$(pwd) TEST_NO_CREATE_REPO=t TEST_NO_MALLOC_CHECK=t -. ../test-lib.sh +# While test-lib.sh computes the build directory for us, we also have to do the +# same thing in order to locate the script via GIT-BUILD-OPTIONS in the first +# place. +GIT_BUILD_DIR="${GIT_BUILD_DIR:-$TEST_DIRECTORY/..}" +if test -f "$GIT_BUILD_DIR/GIT-BUILD-DIR" +then + GIT_BUILD_DIR="$(cat "$GIT_BUILD_DIR/GIT-BUILD-DIR")" || exit 1 + # On Windows, we must convert Windows paths lest they contain a colon + case "$(uname -s)" in + *MINGW*) + GIT_BUILD_DIR="$(cygpath -au "$GIT_BUILD_DIR")" + ;; + esac +fi + +if test ! -f "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS +then + echo >&2 'error: GIT-BUILD-OPTIONS missing (has Git been built?).' + exit 1 +fi + +. "$GIT_BUILD_DIR"/GIT-BUILD-OPTIONS +. "$GIT_SOURCE_DIR"/t/test-lib.sh unset GIT_CONFIG_NOSYSTEM GIT_CONFIG_SYSTEM="$TEST_DIRECTORY/perf/config" @@ -324,7 +346,7 @@ test_at_end_hook_ () { if test -z "$GIT_PERF_AGGREGATING_LATER"; then ( cd "$TEST_DIRECTORY"/perf && - "$PERL_PATH" ./aggregate.perl --results-dir="$TEST_RESULTS_DIR" $(basename "$0") + "$PERL_PATH" "$GIT_SOURCE_DIR"/t/perf/aggregate.perl --results-dir="$TEST_RESULTS_DIR" $(basename "$0") ) fi } From patchwork Mon Apr 14 06:51:14 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 14049842 Received: from fout-b2-smtp.messagingengine.com (fout-b2-smtp.messagingengine.com [202.12.124.145]) (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 BF3FE1B87C0 for ; Mon, 14 Apr 2025 06:51:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.145 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613481; cv=none; b=kvrOX9c9eZ7xM2rVzgQcMlMB8zUJwZQmVEyz4v4ddpwu+YCBxEcop2g4aKd9uAuxO27CmUcT6fHvmpa2a9AXEuuageMl0RlS+aPqYGLt/eiGUS4TXeSp+DyrawU1QabpYJwVokXd6wRojmL1PHYLFyZgefWWxGvFIkRXQRiTBbk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613481; c=relaxed/simple; bh=p4uKXXrpLbmrRBuWjgPwonGkNeGbp0tWQ8MCymIzOdU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To; b=ZKnuPuwtk/MkI3IlizDFYGgq68dJK6fC69Q21CllIMAbyrvTm7yj9FKgVQfsQkmIdyjmJ8BfKdGV9foX78QTS5Ab9RqeV6N76Ll3AoC32dabNEGH6eFxqWXIVQqI5CO6g9nrIhzi66GIaYA4KOzHdBuJpySzNOAPxVsalTngr2o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=Ur+5btaj; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=ncTiCOAS; arc=none smtp.client-ip=202.12.124.145 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="Ur+5btaj"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="ncTiCOAS" Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id D0CCA1140109 for ; Mon, 14 Apr 2025 02:51:18 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 14 Apr 2025 02:51:18 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1744613478; x=1744699878; bh=+vdvMOwKZehbvKlYMZC2vQExqr3GlcsWRoGYhFcBoeA=; b= Ur+5btaj8A3YRt8/MSmKyQd6RNoLsqQrZ7ZpZltAFwySAOVe+7CF8UAkL1uo0X9S +qNtGDQo6ZLr6JfriJhQmutY3N0TkXrCYwTKhKlkZAQRvBk/04WVvifieLSmJnKs pgRlwL6LdoxCQIYCELdNCJCWA2SwNg89kGb9I+aBSjJKyzMnFHsRFs+SEbzSsxwm IZ0RvKy2ESPe3+5pyrfSMJEmdTVL3aNbEQa1LgSveiY7V30sHx34V7KDwJwy/oLc Wsh8/UxMXeX3BcOTxqmqQBYPi+w92sS92VP1mwdzhELCP/Xl88oEdVHe/pzvEoIz kne0NSiuvDqazIAmW+umMQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1744613478; x=1744699878; bh=+ vdvMOwKZehbvKlYMZC2vQExqr3GlcsWRoGYhFcBoeA=; b=ncTiCOASvZ1wY6ya6 hdnbsSTmDJqPTWnSuuuP/UwCn1rljC135NUP0N9VMDEkM4SipWIfklD5uptqzVim boWkNtrIPJQRWDC/8mOjcQUaFn3ZUbkz6ZacLmRnxeOAhRgxYrqfdCQ7oI5SizAZ bwB/UwzXZcfHNfL478H2y1VL/4zT8LpvPeMvMrI7amWXSRu+Xst3/PWaKvHuX6Ac En+tWI4ChO/nygum6vDO9DbpwtM5SQywBeT/rxh3/NUMsaGyg8iVMIFGoH2Qu++4 zgBQ4wtaBGRMUSumkMQvzNOH7mPKXfDQdYZ9f2oiqLIxUkvPjpPYJP+lhi3G8fGu ipmmw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvudelkeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhff fugggtgffkfhgjvffosehtjeertdertdejnecuhfhrohhmpefrrghtrhhitghkucfuthgv ihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrhhnpeelueduue eljeelhfejueeffefgtedtvedtfeeffeevleelueetffegteduffegleenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhmpd hnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgihht sehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 14 Apr 2025 02:51:18 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id a0b1eeb3 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 14 Apr 2025 06:51:17 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 14 Apr 2025 08:51:14 +0200 Subject: [PATCH v2 4/5] meson: wire up benchmarks Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250414-pks-meson-benchmarks-v2-4-04377080a167@pks.im> References: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> In-Reply-To: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> To: git@vger.kernel.org X-Mailer: b4 0.14.2 Wire up benchmarks in Meson. The setup is mostly the same as how we wire up our tests. The only difference is that benchmarks get wired up via the `benchmark()` option instead of via `test()`, which gives them a bit of special treatment: - Benchmarks never run in parallel. - Benchmarks aren't run by default when tests are executed. - Meson does not inject the `MALLOC_PERTURB` environment variable. Using benchmarks is quite simple: ``` $ meson setup build # Run all benchmarks. $ meson test -C build --benchmark # Run a specific benchmark. $ meson test -C build --benchmark p0000-* ``` Other than that the usual command line arguments accepted when running tests are also accepted when running benchmarks. Note that the benchmarking target is somewhat limited because it will only run benchmarks for the current build. Other usecases, like running benchmarks against multiple different versions of Git, are not currently supported. Users should continue to use "t/perf/run" for those usecases. The script should get extended at one point in time to support Meson, but this is outside of the scope of this series. Signed-off-by: Patrick Steinhardt --- meson.build | 1 + t/meson.build | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+) diff --git a/meson.build b/meson.build index efe2871c9db..9af4a10188d 100644 --- a/meson.build +++ b/meson.build @@ -204,6 +204,7 @@ git = find_program('git', dirs: program_path, required: false) sed = find_program('sed', dirs: program_path) shell = find_program('sh', dirs: program_path) tar = find_program('tar', dirs: program_path) +time = find_program('time', dirs: program_path, required: false) # Sanity-check that programs required for the build exist. foreach tool : ['cat', 'cut', 'grep', 'sort', 'tr', 'uname'] diff --git a/t/meson.build b/t/meson.build index a59da26be3f..dba327fd7ec 100644 --- a/t/meson.build +++ b/t/meson.build @@ -1096,11 +1096,71 @@ integration_tests = [ 't9903-bash-prompt.sh', ] +benchmarks = [ + 'perf/p0000-perf-lib-sanity.sh', + 'perf/p0001-rev-list.sh', + 'perf/p0002-read-cache.sh', + 'perf/p0003-delta-base-cache.sh', + 'perf/p0004-lazy-init-name-hash.sh', + 'perf/p0005-status.sh', + 'perf/p0006-read-tree-checkout.sh', + 'perf/p0007-write-cache.sh', + 'perf/p0008-odb-fsync.sh', + 'perf/p0071-sort.sh', + 'perf/p0090-cache-tree.sh', + 'perf/p0100-globbing.sh', + 'perf/p1006-cat-file.sh', + 'perf/p1400-update-ref.sh', + 'perf/p1450-fsck.sh', + 'perf/p1451-fsck-skip-list.sh', + 'perf/p1500-graph-walks.sh', + 'perf/p2000-sparse-operations.sh', + 'perf/p3400-rebase.sh', + 'perf/p3404-rebase-interactive.sh', + 'perf/p4000-diff-algorithms.sh', + 'perf/p4001-diff-no-index.sh', + 'perf/p4002-diff-color-moved.sh', + 'perf/p4205-log-pretty-formats.sh', + 'perf/p4209-pickaxe.sh', + 'perf/p4211-line-log.sh', + 'perf/p4220-log-grep-engines.sh', + 'perf/p4221-log-grep-engines-fixed.sh', + 'perf/p5302-pack-index.sh', + 'perf/p5303-many-packs.sh', + 'perf/p5304-prune.sh', + 'perf/p5310-pack-bitmaps.sh', + 'perf/p5311-pack-bitmaps-fetch.sh', + 'perf/p5312-pack-bitmaps-revs.sh', + 'perf/p5313-pack-objects.sh', + 'perf/p5314-name-hash.sh', + 'perf/p5326-multi-pack-bitmaps.sh', + 'perf/p5332-multi-pack-reuse.sh', + 'perf/p5333-pseudo-merge-bitmaps.sh', + 'perf/p5550-fetch-tags.sh', + 'perf/p5551-fetch-rescan.sh', + 'perf/p5600-partial-clone.sh', + 'perf/p5601-clone-reference.sh', + 'perf/p6100-describe.sh', + 'perf/p6300-for-each-ref.sh', + 'perf/p7000-filter-branch.sh', + 'perf/p7102-reset.sh', + 'perf/p7300-clean.sh', + 'perf/p7519-fsmonitor.sh', + 'perf/p7527-builtin-fsmonitor.sh', + 'perf/p7810-grep.sh', + 'perf/p7820-grep-engines.sh', + 'perf/p7821-grep-engines-fixed.sh', + 'perf/p7822-grep-perl-character.sh', + 'perf/p9210-scalar.sh', + 'perf/p9300-fast-import-export.sh', +] + # Sanity check that we are not missing any tests present in 't/'. This check # only runs once at configure time and is thus best-effort, only. It is # sufficient to catch missing test suites in our CI though. foreach glob, tests : { 't[0-9][0-9][0-9][0-9]-*.sh': integration_tests, + 'perf/p[0-9][0-9][0-9][0-9]-*.sh': benchmarks, 'unit-tests/t-*.c': unit_test_programs, 'unit-tests/u-*.c': clar_test_suites, } @@ -1152,3 +1212,20 @@ foreach integration_test : integration_tests timeout: 0, ) endforeach + +if time.found() + benchmark_environment = test_environment + benchmark_environment.set('GTIME', time.full_path()) + + foreach benchmark : benchmarks + benchmark(fs.stem(benchmark), shell, + args: [ + fs.name(benchmark), + ], + workdir: meson.current_source_dir() / 'perf', + env: benchmark_environment, + depends: test_dependencies + bin_wrappers, + timeout: 0, + ) + endforeach +endif From patchwork Mon Apr 14 06:51:15 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Steinhardt X-Patchwork-Id: 14049843 Received: from fhigh-b1-smtp.messagingengine.com (fhigh-b1-smtp.messagingengine.com [202.12.124.152]) (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 130331C6FFA for ; Mon, 14 Apr 2025 06:51:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=202.12.124.152 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613483; cv=none; b=QVZEPtUpQ4KxsblgUAaGintt2xM+guIoEKN/JrsZQbyqjg/kUxFIeq0mzIHis8u7B9HCmlkgqib+nYDsTpJavK1gUJbgC8YwSQwPeNOE42NGUQ0FH/o8Oo0Mic/C3aIjjYIc9BajBYck/+G2lSxTdvfwqUFgCbb/TWwbnUAJ1+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744613483; c=relaxed/simple; bh=x6OSd+3/KRXw7vltgagM3on1EfNRoFD1HAURuPyBGXg=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To; b=Ch3uOMl07tesuMFioU5p4V85A+Wb+hXP5hOWGWkqvxUHY30SeNFN/UlD/ViiqRNoTGzxhj1jJ6IaPByZjaPj6JYGWDi4uFrh+HpXHkUlaDiuHqZzxz25jMFEq2uQs5ZsAbAenmVKjijbwkRbzkVuNKdyyGZCVuJChkUXORkrQQw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im; spf=pass smtp.mailfrom=pks.im; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b=UY4aQZlF; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b=CUx58od+; arc=none smtp.client-ip=202.12.124.152 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=pks.im Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pks.im Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pks.im header.i=@pks.im header.b="UY4aQZlF"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="CUx58od+" Received: from phl-compute-08.internal (phl-compute-08.phl.internal [10.202.2.48]) by mailfhigh.stl.internal (Postfix) with ESMTP id E986F254007F for ; Mon, 14 Apr 2025 02:51:19 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-08.internal (MEProxy); Mon, 14 Apr 2025 02:51:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pks.im; h=cc :content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1744613479; x=1744699879; bh=g+ZPP7Cx8Q+V1v76tNHwGI7Q2WNIxi292/8h7JkEMsU=; b= UY4aQZlFnwabjoEDOwS/BZFzeHYaFwJvMrS5g+XdwQvoh8aMaOpKZewvNvKe7owC MTBWWi+a6F00gEPIToYQlS9idUr3bBNX/5eRLhSlRs3YY/kBFO5l3TWmj47Tjq43 cl7av1JV9fXf0OMgenjV0c2qo5M17gdF9JizkuD1OXTg5OU7Z4B18lnDmMRm6LXw OEv+fvGW5iOvND4TCGu28sSZrQOz6OZrRGzPRMwk846UHWSmPcp29rTLixPAlOZt 6I3asQ2gnttvzfFsongujt9R2DiCbMl4tLRbxR7q1V+oEyHR9YXky0BccTK8jkAJ QJtc4f8eFO/1copTTNuf0Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; t=1744613479; x=1744699879; bh=g +ZPP7Cx8Q+V1v76tNHwGI7Q2WNIxi292/8h7JkEMsU=; b=CUx58od+kcWZgSd5d mwpUNHZUUw7kOTD/8mIObensO4Gjlgcvgpmi/8qWzObAjrXl1ToNtq3c6bIImGuF 42oekJv41phrBVb6mkCzAVyiz01fdeuFdfglGNerg/mtpYF6PBoFCPO8xHsoJYD+ hv9l0JTYMBTh7Zc5j99Y9RWsXxSoBl92OUPTaSa0xklmjoqyqvrPzMRv5x7bp+Ya JvqYAHXDzzEgR74BvIR8LE2oAH39FJhB8ncFgfzI9S6GNvWL6XoTFIdDMSxaBpFf BNPSIuzgE+icUVodDFOdmFksUeZvTSWyfmaG0xFUzGhTkJm9pRCcqpYHQKTiKq5C ZXsSA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvudelkeekucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefhff fugggtgffkfhgjvffosehtjeertdertdejnecuhfhrohhmpefrrghtrhhitghkucfuthgv ihhnhhgrrhguthcuoehpshesphhkshdrihhmqeenucggtffrrghtthgvrhhnpeelueduue eljeelhfejueeffefgtedtvedtfeeffeevleelueetffegteduffegleenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpshesphhkshdrihhmpd hnsggprhgtphhtthhopedupdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehgihht sehvghgvrhdrkhgvrhhnvghlrdhorhhg X-ME-Proxy: Feedback-ID: i197146af:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Mon, 14 Apr 2025 02:51:19 -0400 (EDT) Received: by vm-mail (OpenSMTPD) with ESMTPSA id 7af04519 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO) for ; Mon, 14 Apr 2025 06:51:18 +0000 (UTC) From: Patrick Steinhardt Date: Mon, 14 Apr 2025 08:51:15 +0200 Subject: [PATCH v2 5/5] meson: wire up benchmarking options Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20250414-pks-meson-benchmarks-v2-5-04377080a167@pks.im> References: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> In-Reply-To: <20250414-pks-meson-benchmarks-v2-0-04377080a167@pks.im> To: git@vger.kernel.org X-Mailer: b4 0.14.2 Wire up a couple of benchmarking options that we end up writing into our "GIT-BUILD-OPTIONS" file. These options allow users to control how exactly benchmarks are executed. Note that neither `GIT_PERF_MAKE_COMMAND` nor `GIT_PERF_MAKE_OPTS` are exposed as a build option. Those options are used by "t/perf/run", which is not used by Meson. Signed-off-by: Patrick Steinhardt --- meson.build | 6 +++--- meson_options.txt | 6 ++++++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 9af4a10188d..ba128ab0759 100644 --- a/meson.build +++ b/meson.build @@ -660,11 +660,11 @@ builtin_sources += custom_target( # build options to our tests. build_options_config = configuration_data() build_options_config.set('GIT_INTEROP_MAKE_OPTS', '') -build_options_config.set('GIT_PERF_LARGE_REPO', '') +build_options_config.set_quoted('GIT_PERF_LARGE_REPO', get_option('benchmark_large_repo')) build_options_config.set('GIT_PERF_MAKE_COMMAND', '') build_options_config.set('GIT_PERF_MAKE_OPTS', '') -build_options_config.set('GIT_PERF_REPEAT_COUNT', '') -build_options_config.set('GIT_PERF_REPO', '') +build_options_config.set_quoted('GIT_PERF_REPEAT_COUNT', get_option('benchmark_repeat_count').to_string()) +build_options_config.set_quoted('GIT_PERF_REPO', get_option('benchmark_repo')) build_options_config.set('GIT_TEST_CMP_USE_COPIED_CONTEXT', '') build_options_config.set('GIT_TEST_INDEX_VERSION', '') build_options_config.set('GIT_TEST_OPTS', '') diff --git a/meson_options.txt b/meson_options.txt index 78d172a7401..ca106c43b2e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -101,6 +101,12 @@ option('docs_backend', type: 'combo', choices: ['asciidoc', 'asciidoctor', 'auto description: 'Which backend to use to generate documentation.') # Testing. +option('benchmark_repo', type: 'string', value: '', + description: 'Repository to copy for the performance tests. Should be at least the size of the Git repository.') +option('benchmark_large_repo', type: 'string', value: '', + description: 'Large repository to copy for the performance tests. Should be at least the size of the Linux repository.') +option('benchmark_repeat_count', type: 'integer', value: 3, + description: 'Number of times a test should be repeated for best-of-N measurements.') option('coccinelle', type: 'feature', value: 'auto', description: 'Provide a coccicheck target that generates a Coccinelle patch.') option('tests', type: 'boolean', value: true,