Message ID | 0613b07676e8abd0b4f342784b94d11174981537.1602968677.git.gitgitgadget@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | use fsmonitor data in git diff eliminating O(num_files) calls to lstat | expand |
"Nipunn Koorapati via GitGitGadget" <gitgitgadget@gmail.com> writes: > +test_perf "diff (fsmonitor=$INTEGRATION_SCRIPT)" ' > + git diff This is a whole-tree diff. It would be interesting to also see if a meaningful tradeoff exists if a test is run with a tree with say 100 top-level subdirectories but with just one of them covered by a pathspec, with many modified paths sprinkled all over. > +' > + > if test_have_prereq WATCHMAN > then > watchman watch-del "$GIT_WORK_TREE" >/dev/null 2>&1 &&
diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh index 9313d4a51d..80d0148557 100755 --- a/t/perf/p7519-fsmonitor.sh +++ b/t/perf/p7519-fsmonitor.sh @@ -142,6 +142,14 @@ test_perf "status -uall (fsmonitor=$INTEGRATION_SCRIPT)" ' git status -uall ' +if test -n "$GIT_PERF_7519_DROP_CACHE"; then + test-tool drop-caches +fi + +test_perf "diff (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff +' + test_expect_success "setup without fsmonitor" ' unset INTEGRATION_SCRIPT && git config --unset core.fsmonitor && @@ -172,6 +180,14 @@ test_perf "status -uall (fsmonitor=$INTEGRATION_SCRIPT)" ' git status -uall ' +if test -n "$GIT_PERF_7519_DROP_CACHE"; then + test-tool drop-caches +fi + +test_perf "diff (fsmonitor=$INTEGRATION_SCRIPT)" ' + git diff +' + if test_have_prereq WATCHMAN then watchman watch-del "$GIT_WORK_TREE" >/dev/null 2>&1 &&