All of lore.kernel.org
 help / color / mirror / Atom feed
From: "René Scharfe" <l.s.r@web.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Derrick Stolee <stolee@gmail.com>,
	Derrick Stolee via GitGitGadget <gitgitgadget@gmail.com>,
	Git List <git@vger.kernel.org>
Subject: [PATCH] perf: disable automatic housekeeping
Date: Sat, 9 Oct 2021 16:39:24 +0200	[thread overview]
Message-ID: <ba3e16f7-bf9c-c5f3-4c0d-8288db6f44c7@web.de> (raw)
In-Reply-To: <xmqqsfxersvy.fsf@gitster.g>

Turn off automatic background maintenance for perf tests by default to
avoid interference with performance measurements.  Do that by using the
new file t/perf/config and using it as the system config file for perf
tests.  Future tests intended to measure gc performance can override
the setting locally or call "git gc" explicitly.

This fixes a breakage in p2000 caused by gc automatically emptying the
reflog due its fake dates from 2005 being older than 90 days.

Helped-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
---
 t/perf/config      | 2 ++
 t/perf/perf-lib.sh | 4 ++++
 2 files changed, 6 insertions(+)
 create mode 100644 t/perf/config

diff --git a/t/perf/config b/t/perf/config
new file mode 100644
index 0000000000..b92768b039
--- /dev/null
+++ b/t/perf/config
@@ -0,0 +1,2 @@
+[gc]
+	auto = 0
diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
index f74cfd35d6..4c4c568a37 100644
--- a/t/perf/perf-lib.sh
+++ b/t/perf/perf-lib.sh
@@ -27,6 +27,10 @@ TEST_NO_MALLOC_CHECK=t

 . ../test-lib.sh

+unset GIT_CONFIG_NOSYSTEM
+GIT_CONFIG_SYSTEM="$TEST_DIRECTORY/perf/config"
+export GIT_CONFIG_SYSTEM
+
 if test -n "$GIT_TEST_INSTALLED" -a -z "$PERF_SET_GIT_TEST_INSTALLED"
 then
 	error "Do not use GIT_TEST_INSTALLED with the perf tests.
--
2.33.0

  reply	other threads:[~2021-10-09 14:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-02 17:37 p2000 failure due to empty reflog René Scharfe
2021-10-04 19:55 ` Derrick Stolee
2021-10-05 20:28   ` René Scharfe
2021-10-06 16:59     ` Junio C Hamano
2021-10-09 14:39       ` René Scharfe [this message]
2021-10-09 14:57         ` "git reflog expire" blindly trusting timestamps in reflogs Ævar Arnfjörð Bjarmason
2021-10-09 17:50           ` Junio C Hamano
2021-10-11 16:32           ` Jeff King
2021-10-05 21:38   ` p2000 failure due to empty reflog Ævar Arnfjörð Bjarmason
2021-10-09 14:39     ` René Scharfe

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=ba3e16f7-bf9c-c5f3-4c0d-8288db6f44c7@web.de \
    --to=l.s.r@web.de \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=stolee@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.