From 1ecb5ff141f6e54727c746446b52af51016e662c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Scharfe?= Date: Sun, 9 Jun 2013 19:39:17 +0200 Subject: read-cache: add simple performance test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the helper test-read-cache, which can be used to call read_cache and discard_cache in a loop as well as a performance check based on it. Signed-off-by: René Scharfe Signed-off-by: Junio C Hamano --- t/perf/p0002-read-cache.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 t/perf/p0002-read-cache.sh (limited to 't') diff --git a/t/perf/p0002-read-cache.sh b/t/perf/p0002-read-cache.sh new file mode 100755 index 0000000000..9180ae9343 --- /dev/null +++ b/t/perf/p0002-read-cache.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +test_description="Tests performance of reading the index" + +. ./perf-lib.sh + +test_perf_default_repo + +count=1000 +test_perf "read_cache/discard_cache $count times" " + test-read-cache $count +" + +test_done -- cgit v1.2.3