Subject: [PATCH v4 4/4] p0002-read-cache: test core.checksumindex

From: [email-masked]
Date: Mon, 3 Apr 2017 18:53:06 +0000

From: Jeff Hostetler <[email-masked]>

Teach t/perf/p0002-read-cache to time read_cache() with
and without the index checksum calculation.

Signed-off-by: Jeff Hostetler <[email-masked]>
---
 t/perf/p0002-read-cache.sh | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/t/perf/p0002-read-cache.sh b/t/perf/p0002-read-cache.sh
index 9180ae9..71feacd 100755
--- a/t/perf/p0002-read-cache.sh
+++ b/t/perf/p0002-read-cache.sh
@@ -7,7 +7,13 @@ test_description="Tests performance of reading the index"
 test_perf_default_repo
 
 count=1000
-test_perf "read_cache/discard_cache $count times" "
+test_perf "read_cache/discard_cache checksum=1 $count times" "
+	git config --local core.checksumindex 1 &&
+	test-read-cache $count
+"
+
+test_perf "read_cache/discard_cache checksum=0 $count times" "
+	git config --local core.checksumindex 0 &&
 	test-read-cache $count
 "
 
-- 
2.9.3