threads / discuss / 64923

Document that perf tests require GNU time

Subject: Document that perf tests require GNU time

## tl;dr

One message between Feb 5, 2026 and Feb 5, 2026.

replies: 0people: 1as markdown or json

Seth McDonald· Feb 5, 2026, 07:45 UTC · lore
Hi all,

For context, this occurred on my Debian GNU/Linux 13 environment with GNU bash 5.2.37.

I recently cloned the Git repo and began exploring it by first attempting to compile and run Git and its tests. Following the INSTALL file, I ran `make profile` which showed all normal tests passing (sans the expected failures), but *every* perf test failing.

I read any in-repo documentation I could find about the perf tests that seemed relevant, but couldn't find any possible causes for the failures. It was only after reading and following the perf tests' shell code that I came across this in t/perf/perf-lib.sh (lines 206-208, master branch):

	$ sed -n '206,208p' t/perf/perf-lib.sh
	# Perf tests require GNU time
	case "$(uname -s)" in Darwin) GTIME="${GTIME:-gtime}";; esac
	GTIME="${GTIME:-/usr/bin/time}"

While I did have time(1), I didn't have the GNU implementation. I confirmed this was the issue by installing GNU time and again running `make profile-fast`, which now showed all perf tests running successfully.

So to prevent anyone from having the same experience, I would recommend
that either
- the perf tests' dependency on GNU time be more clearly documented.
  Places that seem reasonable for this include INSTALL, t/README, and
  t/perf/README (this file seems most apt IMO).  Or
- in the case that GNU time isn't found, the perf tests output an error
  message explicitly documenting this dependency.

(I would include a patch with this, but I'm certainly not yet familiar enough with the Git repo to confidently do so.)

Take care,
	Seth McDonald.
-- 
On-list:  2336 E8D2 FEB1 5300 692C  62A9 5839 6AD8 9243 D369
Off-list: 82B9 620E 53D0 A1AE 2D69  6111 C267 B002 0A90 0289

← back to recent threads