git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] perf: disable automatic housekeeping

From
René Scharfe <l.s.r@web.de>
Date
Oct 9, 2021, 14:39 UTC
Message-ID
<ba3e16f7-bf9c-c5f3-4c0d-8288db6f44c7@web.de>
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
Previous: Junio C HamanoNext: Ævar Arnfjörð Bjarmason
Message 5 of 10 in “p2000 failure due to empty reflog”
  1. René ScharfeOct 2, 2021
  2. Derrick StoleeOct 4, 2021
  3. René ScharfeOct 5, 2021
  4. Junio C HamanoOct 6, 2021
  5. perf: disable automatic housekeepingRené Scharfe, Oct 9, 2021
  6. "git reflog expire" blindly trusting timestamps in reflogsÆvar Arnfjörð Bjarmason, Oct 9, 2021
  7. Junio C HamanoOct 9, 2021
  8. Jeff KingOct 11, 2021
  9. Ævar Arnfjörð BjarmasonOct 5, 2021
  10. René ScharfeOct 9, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.