Skip to content

Commit be79131

Browse files
rscharfegitster
authored andcommitted
perf: disable automatic housekeeping
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 <[email protected]> Signed-off-by: René Scharfe <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 225bc32 commit be79131

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

t/perf/config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[gc]
2+
auto = 0

t/perf/perf-lib.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ TEST_NO_MALLOC_CHECK=t
2727

2828
. ../test-lib.sh
2929

30+
unset GIT_CONFIG_NOSYSTEM
31+
GIT_CONFIG_SYSTEM="$TEST_DIRECTORY/perf/config"
32+
export GIT_CONFIG_SYSTEM
33+
3034
if test -n "$GIT_TEST_INSTALLED" -a -z "$PERF_SET_GIT_TEST_INSTALLED"
3135
then
3236
error "Do not use GIT_TEST_INSTALLED with the perf tests.

0 commit comments

Comments
 (0)