diff mbox series

[10/10] t/perf/fsmonitor: add benchmark for dirty status

Message ID e5b0eee172b1186e39b5f9cdb649185b5b91253d.1603740773.git.gitgitgadget@gmail.com (mailing list archive)
State Accepted
Commit 1c6833c800ad98adecd85815db103cfd4d06c50a
Headers show
Series Update fsmonitor perf suite to support integration comparisons | expand

Commit Message

Nipunn Koorapati Oct. 26, 2020, 7:32 p.m. UTC
From: Nipunn Koorapati <nipunn@dropbox.com>

This benchmark covers the git status time for a heavily
dirty directory - benchmarking fsmonitor's refresh

When running to compare our perl vs rs-git-fsmonitor - we see that
the perl script incurs significant overhead - further motivation
to provide a faster implementation within git.

7519.7: status (dirty) (fsmonitor=query-watchman) 10.05(7.78+1.56)
7519.20: status (dirty) (fsmonitor=rs-git-fsmonitor) 6.72(4.37+1.64)
7519.33: status (dirty) (fsmonitor=disabled) 5.62(4.24+2.03)

Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com>
---
 t/perf/p7519-fsmonitor.sh | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh
index 577f79d455..163a13bea3 100755
--- a/t/perf/p7519-fsmonitor.sh
+++ b/t/perf/p7519-fsmonitor.sh
@@ -165,6 +165,11 @@  test_fsmonitor_suite() {
 		git status -uall
 	'
 
+	test_perf_w_drop_caches "status (dirty) ($DESC)" '
+		git ls-files | head -100000 | xargs -d "\n" touch -h &&
+		git status
+	'
+
 	test_perf_w_drop_caches "diff ($DESC)" '
 		git diff
 	'