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

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

From
Ggit@jeffhostetler.com <git@jeffhostetler.com>
Date
Apr 3, 2017, 18:53 UTC
Message-ID
<20170403185306.36164-5-git@jeffhostetler.com>
In-Reply-To
<20170403185306.36164-1-git@jeffhostetler.com>
From: Jeff Hostetler <jeffhost@microsoft.com>

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

Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
---
 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
Previous: git@jeffhostetler.comNext: git@jeffhostetler.com
Message 3 of 11 in “read-cache: call verify_hdr() in a background thread”
  1. 0/4 read-cache: call verify_hdr() in a background threadgit@jeffhostetler.com, Apr 3, 2017
  2. 1/4 read-cache: core.checksumindexgit@jeffhostetler.com, Apr 3, 2017
  3. 4/4 p0002-read-cache: test core.checksumindexgit@jeffhostetler.com, Apr 3, 2017
  4. 2/4 fsck: force core.checksumindex=1git@jeffhostetler.com, Apr 3, 2017
  5. Ævar Arnfjörð BjarmasonApr 3, 2017
  6. Jeff KingApr 4, 2017
  7. Ævar Arnfjörð BjarmasonApr 4, 2017
  8. Jeff KingApr 4, 2017
  9. Jeff HostetlerApr 4, 2017
  10. Jeff KingApr 4, 2017
  11. 3/4 t1450-fsck: test core.checksumindexgit@jeffhostetler.com, Apr 3, 2017

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.