{"thread":{"id":"54511","subject":"[PATCH 03/10] t/perf/fsmonitor: improve error message if typoing hook name","startedAt":"2020-10-26T19:33:04Z","lastAt":"2020-10-26T22:02:42Z","messageCount":13,"participants":["Nipunn Koorapati via GitGitGadget","Junio C Hamano","Nipunn Koorapati"],"isPatch":true,"patchVersion":1,"patchTotal":10},"messages":[{"id":"408437","messageId":"79cc61f56adf7769521d2e2ba4c27c1a3bbc1d76.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 03/10] t/perf/fsmonitor: improve error message if typoing hook name","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:46Z","receivedAt":"2020-10-26T19:33:04Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nPreviously - it would silently run the perf suite w/o using\nfsmonitor - fsmonitor errors are not hard failures.\nNow it errors loudly.\n\nGIT_PERF_7519_FSMONITOR=\"$HOME/rs-git-fsmonitorr\"\n./p7519-fsmonitor.sh -i -v\n\nfatal: cannot run /home/nipunn/rs-git-fsmonitorr:\nNo such file or directory\nnot ok 2 - setup for fsmonitor\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 4 +++-\n 1 file changed, 3 insertions(+), 1 deletion(-)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex 4030f569cf..88b3717e2a 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -126,7 +126,9 @@ test_expect_success \"setup for fsmonitor\" '\n \tfi &&\n \n \tgit config core.fsmonitor \"$INTEGRATION_SCRIPT\" &&\n-\tgit update-index --fsmonitor &&\n+\tgit update-index --fsmonitor 2>error &&\n+\tcat error &&\n+\t[ ! -s error ] && # ensure no silent error\n \tgit status  # Warm caches\n '\n \n-- \ngitgitgadget\n\n"},{"id":"408438","messageId":"6543e90c00843214676b658a033656e040f1c6a1.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 06/10] t/perf/fsmonitor: silence initial git commit","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:49Z","receivedAt":"2020-10-26T19:33:19Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nIt is extremely verbose, printing >10K non-useful lines\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex 2c817db1ae..970caff3d2 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -94,7 +94,7 @@ test_expect_success \"one time repo setup\" '\n \tfor i in $(test_seq 1 1000); do touch 1000_files/$i; done &&\n \tfor i in $(test_seq 1 10000); do touch 10000_files/$i; done &&\n \tgit add 1_file 10_files 100_files 1000_files 10000_files &&\n-\tgit commit -m \"Add files\" &&\n+\tgit commit -qm \"Add files\" &&\n \n \t# If Watchman exists, watch the work tree and attempt a query.\n \tif test_have_prereq WATCHMAN; then\n-- \ngitgitgadget\n\n"},{"id":"408439","messageId":"409f400376dadd81335cb32e026bec1b4f0f5a26.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 07/10] t/perf/fsmonitor: factor setup for fsmonitor into function","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:50Z","receivedAt":"2020-10-26T19:33:21Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nThis prepares for it being called multiple times when\ntesting different hooks\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex 970caff3d2..087f66ecc2 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -103,7 +103,7 @@ test_expect_success \"one time repo setup\" '\n \tfi\n '\n \n-test_expect_success \"setup for fsmonitor\" '\n+setup_for_fsmonitor() {\n \t# set INTEGRATION_SCRIPT depending on the environment\n \tif test -n \"$GIT_PERF_7519_FSMONITOR\"\n \tthen\n@@ -130,7 +130,7 @@ test_expect_success \"setup for fsmonitor\" '\n \tcat error &&\n \t[ ! -s error ] && # ensure no silent error\n \tgit status  # Warm caches\n-'\n+}\n \n test_perf_w_drop_caches () {\n \tif test -n \"$GIT_PERF_7519_DROP_CACHE\"; then\n@@ -188,6 +188,10 @@ test_fsmonitor_suite() {\n \t'\n }\n \n+test_expect_success \"setup for fsmonitor\" '\n+\tsetup_for_fsmonitor\n+'\n+\n test_fsmonitor_suite\n \n test_expect_success \"setup without fsmonitor\" '\n-- \ngitgitgadget\n\n"},{"id":"408440","messageId":"055896284083aa0607404ffe82f6d44df61fcf59.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 08/10] t/perf/fsmonitor: initialize test with git reset","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:51Z","receivedAt":"2020-10-26T19:33:23Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nPreviously, the git add of the previous suiterun would\npollute the numbers in the second run\n\nBefore:\nTest                                                          this tree\n-----------------------------------------------------------------------------\n7519.4: status (fsmonitor=fsmonitor-watchman)                 0.40(0.36+0.04)\n7519.5: status -uno (fsmonitor=fsmonitor-watchman)            0.19(0.12+0.07)\n7519.6: status -uall (fsmonitor=fsmonitor-watchman)           1.36(0.74+0.61)\n7519.7: diff (fsmonitor=fsmonitor-watchman)                   0.14(0.10+0.04)\n7519.8: diff -- 0_files (fsmonitor=fsmonitor-watchman)        0.14(0.10+0.04)\n7519.9: diff -- 10_files (fsmonitor=fsmonitor-watchman)       0.14(0.09+0.05)\n7519.10: diff -- 100_files (fsmonitor=fsmonitor-watchman)     0.14(0.10+0.04)\n7519.11: diff -- 1000_files (fsmonitor=fsmonitor-watchman)    0.14(0.08+0.06)\n7519.12: diff -- 10000_files (fsmonitor=fsmonitor-watchman)   0.14(0.10+0.04)\n7519.13: add (fsmonitor=fsmonitor-watchman)                   2.03(1.28+0.69)\n7519.16: status (fsmonitor=disabled)                          0.64(0.49+0.90)\n7519.17: status -uno (fsmonitor=disabled)                     1.15(0.92+1.00)\n7519.18: status -uall (fsmonitor=disabled)                    2.32(1.46+1.55)\n7519.19: diff (fsmonitor=disabled)                            1.44(1.12+1.76)\n7519.20: diff -- 0_files (fsmonitor=disabled)                 0.11(0.07+0.05)\n7519.21: diff -- 10_files (fsmonitor=disabled)                0.11(0.06+0.05)\n7519.22: diff -- 100_files (fsmonitor=disabled)               0.11(0.08+0.03)\n7519.23: diff -- 1000_files (fsmonitor=disabled)              0.11(0.08+0.04)\n7519.24: diff -- 10000_files (fsmonitor=disabled)             0.12(0.06+0.07)\n7519.25: add (fsmonitor=disabled)                             2.25(1.47+1.47)\n\nAfter:\nTest                                                          this tree\n-----------------------------------------------------------------------------\n7519.4: status (fsmonitor=fsmonitor-watchman)                 0.41(0.33+0.09)\n7519.5: status -uno (fsmonitor=fsmonitor-watchman)            0.20(0.14+0.07)\n7519.6: status -uall (fsmonitor=fsmonitor-watchman)           1.37(0.78+0.58)\n7519.7: diff (fsmonitor=fsmonitor-watchman)                   0.14(0.10+0.04)\n7519.8: diff -- 0_files (fsmonitor=fsmonitor-watchman)        0.14(0.08+0.06)\n7519.9: diff -- 10_files (fsmonitor=fsmonitor-watchman)       0.14(0.09+0.05)\n7519.10: diff -- 100_files (fsmonitor=fsmonitor-watchman)     0.14(0.10+0.05)\n7519.11: diff -- 1000_files (fsmonitor=fsmonitor-watchman)    0.14(0.11+0.04)\n7519.12: diff -- 10000_files (fsmonitor=fsmonitor-watchman)   0.14(0.09+0.05)\n7519.13: add (fsmonitor=fsmonitor-watchman)                   2.04(1.27+0.71)\n7519.16: status (fsmonitor=disabled)                          0.78(0.59+0.99)\n7519.17: status -uno (fsmonitor=disabled)                     0.43(0.32+0.88)\n7519.18: status -uall (fsmonitor=disabled)                    1.58(0.96+1.38)\n7519.19: diff (fsmonitor=disabled)                            0.36(0.31+0.79)\n7519.20: diff -- 0_files (fsmonitor=disabled)                 0.11(0.08+0.03)\n7519.21: diff -- 10_files (fsmonitor=disabled)                0.11(0.07+0.04)\n7519.22: diff -- 100_files (fsmonitor=disabled)               0.11(0.08+0.04)\n7519.23: diff -- 1000_files (fsmonitor=disabled)              0.11(0.07+0.05)\n7519.24: diff -- 10000_files (fsmonitor=disabled)             0.12(0.08+0.05)\n7519.25: add (fsmonitor=disabled)                             2.25(1.48+1.47)\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 8 ++++++--\n 1 file changed, 6 insertions(+), 2 deletions(-)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex 087f66ecc2..51c03a2596 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -128,8 +128,7 @@ setup_for_fsmonitor() {\n \tgit config core.fsmonitor \"$INTEGRATION_SCRIPT\" &&\n \tgit update-index --fsmonitor 2>error &&\n \tcat error &&\n-\t[ ! -s error ] && # ensure no silent error\n-\tgit status  # Warm caches\n+\t[ ! -s error ] # ensure no silent error\n }\n \n test_perf_w_drop_caches () {\n@@ -147,6 +146,11 @@ test_fsmonitor_suite() {\n \t\tDESC=\"fsmonitor=disabled\"\n \tfi\n \n+\ttest_expect_success \"test_initialization\" '\n+\t\tgit reset --hard &&\n+\t\tgit status  # Warm caches\n+\t'\n+\n \ttest_perf_w_drop_caches \"status ($DESC)\" '\n \t\tgit status\n \t'\n-- \ngitgitgadget\n\n"},{"id":"408441","messageId":"e5b0eee172b1186e39b5f9cdb649185b5b91253d.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 10/10] t/perf/fsmonitor: add benchmark for dirty status","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:53Z","receivedAt":"2020-10-26T19:33:32Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nThis benchmark covers the git status time for a heavily\ndirty directory - benchmarking fsmonitor's refresh\n\nWhen running to compare our perl vs rs-git-fsmonitor - we see that\nthe perl script incurs significant overhead - further motivation\nto provide a faster implementation within git.\n\n7519.7: status (dirty) (fsmonitor=query-watchman) 10.05(7.78+1.56)\n7519.20: status (dirty) (fsmonitor=rs-git-fsmonitor) 6.72(4.37+1.64)\n7519.33: status (dirty) (fsmonitor=disabled) 5.62(4.24+2.03)\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 5 +++++\n 1 file changed, 5 insertions(+)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex 577f79d455..163a13bea3 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -165,6 +165,11 @@ test_fsmonitor_suite() {\n \t\tgit status -uall\n \t'\n \n+\ttest_perf_w_drop_caches \"status (dirty) ($DESC)\" '\n+\t\tgit ls-files | head -100000 | xargs -d \"\\n\" touch -h &&\n+\t\tgit status\n+\t'\n+\n \ttest_perf_w_drop_caches \"diff ($DESC)\" '\n \t\tgit diff\n \t'\n-- \ngitgitgadget\n"},{"id":"408442","messageId":"7ee7b4e9e67378539ddcd081f7967128f4e47350.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 09/10] t/perf/fsmonitor: perf comparison of multiple fsmonitor integrations","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:52Z","receivedAt":"2020-10-26T19:33:37Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nAllows for simple perf comparison of different integrations. I ran it\nto compare our perl script w/ rs-git-fsmonitor and found 20-30ms of\noverhead on every command.\n\nOutput looks like this (extra newlines added for readability)\n\nTest                                                        this tree\n---------------------------------------------------------------------------\n7519.4: status (fsmonitor=query-watchman)                   0.42(0.37+0.05)\n7519.5: status -uno (fsmonitor=query-watchman)              0.19(0.12+0.07)\n7519.6: status -uall (fsmonitor=query-watchman)             1.36(0.73+0.62)\n7519.7: diff (fsmonitor=query-watchman)                     0.14(0.09+0.05)\n7519.8: diff -- 0_files (fsmonitor=query-watchman)          0.14(0.11+0.03)\n7519.9: diff -- 10_files (fsmonitor=query-watchman)         0.14(0.10+0.04)\n7519.10: diff -- 100_files (fsmonitor=query-watchman)       0.14(0.09+0.05)\n7519.11: diff -- 1000_files (fsmonitor=query-watchman)      0.14(0.08+0.06)\n7519.12: diff -- 10000_files (fsmonitor=query-watchman)     0.14(0.09+0.05)\n7519.13: add (fsmonitor=query-watchman)                     2.04(1.32+0.66)\n\n7519.16: status (fsmonitor=rs-git-fsmonitor)                0.39(0.32+0.08)\n7519.17: status -uno (fsmonitor=rs-git-fsmonitor)           0.17(0.11+0.06)\n7519.18: status -uall (fsmonitor=rs-git-fsmonitor)          1.33(0.71+0.61)\n7519.19: diff (fsmonitor=rs-git-fsmonitor)                  0.11(0.07+0.04)\n7519.20: diff -- 0_files (fsmonitor=rs-git-fsmonitor)       0.11(0.09+0.03)\n7519.21: diff -- 10_files (fsmonitor=rs-git-fsmonitor)      0.11(0.09+0.03)\n7519.22: diff -- 100_files (fsmonitor=rs-git-fsmonitor)     0.11(0.07+0.04)\n7519.23: diff -- 1000_files (fsmonitor=rs-git-fsmonitor)    0.11(0.06+0.06)\n7519.24: diff -- 10000_files (fsmonitor=rs-git-fsmonitor)   0.11(0.06+0.06)\n7519.25: add (fsmonitor=rs-git-fsmonitor)                   2.03(1.28+0.69)\n\n7519.28: status (fsmonitor=disabled)                        0.77(0.59+0.99)\n7519.29: status -uno (fsmonitor=disabled)                   0.42(0.33+0.85)\n7519.30: status -uall (fsmonitor=disabled)                  1.59(1.02+1.34)\n7519.31: diff (fsmonitor=disabled)                          0.35(0.30+0.81)\n7519.32: diff -- 0_files (fsmonitor=disabled)               0.11(0.08+0.04)\n7519.33: diff -- 10_files (fsmonitor=disabled)              0.11(0.07+0.04)\n7519.34: diff -- 100_files (fsmonitor=disabled)             0.11(0.08+0.03)\n7519.35: diff -- 1000_files (fsmonitor=disabled)            0.11(0.10+0.02)\n7519.36: diff -- 10000_files (fsmonitor=disabled)           0.12(0.07+0.06)\n7519.37: add (fsmonitor=disabled)                           2.24(1.48+1.44)\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 22 ++++++++++++++--------\n 1 file changed, 14 insertions(+), 8 deletions(-)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex 51c03a2596..577f79d455 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -22,7 +22,9 @@ test_description=\"Test core.fsmonitor\"\n #\n # GIT_PERF_7519_UNTRACKED_CACHE: used to configure core.untrackedCache\n # GIT_PERF_7519_SPLIT_INDEX: used to configure core.splitIndex\n-# GIT_PERF_7519_FSMONITOR: used to configure core.fsMonitor\n+# GIT_PERF_7519_FSMONITOR: used to configure core.fsMonitor. May be an\n+#   absolute path to an integration. May be a space delimited list of\n+#   absolute paths to integrations.\n #\n # The big win for using fsmonitor is the elimination of the need to scan the\n # working directory looking for changed and untracked files. If the file\n@@ -105,9 +107,9 @@ test_expect_success \"one time repo setup\" '\n \n setup_for_fsmonitor() {\n \t# set INTEGRATION_SCRIPT depending on the environment\n-\tif test -n \"$GIT_PERF_7519_FSMONITOR\"\n+\tif test -n \"$INTEGRATION_PATH\"\n \tthen\n-\t\tINTEGRATION_SCRIPT=\"$GIT_PERF_7519_FSMONITOR\"\n+\t\tINTEGRATION_SCRIPT=\"$INTEGRATION_PATH\"\n \telse\n \t\t#\n \t\t# Choose integration script based on existence of Watchman.\n@@ -192,11 +194,15 @@ test_fsmonitor_suite() {\n \t'\n }\n \n-test_expect_success \"setup for fsmonitor\" '\n-\tsetup_for_fsmonitor\n-'\n-\n-test_fsmonitor_suite\n+if test -n \"$GIT_PERF_7519_FSMONITOR\"; then\n+\tfor INTEGRATION_PATH in $GIT_PERF_7519_FSMONITOR; do\n+\t\ttest_expect_success \"setup for fsmonitor $INTEGRATION_PATH\" 'setup_for_fsmonitor'\n+\t\ttest_fsmonitor_suite\n+\tdone\n+else\n+\ttest_expect_success \"setup for fsmonitor\" 'setup_for_fsmonitor'\n+\ttest_fsmonitor_suite\n+fi\n \n test_expect_success \"setup without fsmonitor\" '\n \tunset INTEGRATION_SCRIPT &&\n-- \ngitgitgadget\n\n"},{"id":"408443","messageId":"34d11447b46b06ae5f4fa8700885bcc8b70a3a43.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 02/10] t/perf/fsmonitor: move watchman setup to one-time-repo-setup","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:45Z","receivedAt":"2020-10-26T19:33:40Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nIt is only required to be set up once. This prepares for\ntesting multiple hooks in one invocation.\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 16 +++++++++-------\n 1 file changed, 9 insertions(+), 7 deletions(-)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex 23755012df..4030f569cf 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -94,7 +94,13 @@ test_expect_success \"one time repo setup\" '\n \tfor i in $(test_seq 1 1000); do touch 1000_files/$i; done &&\n \tfor i in $(test_seq 1 10000); do touch 10000_files/$i; done &&\n \tgit add 1_file 10_files 100_files 1000_files 10000_files &&\n-\tgit commit -m \"Add files\"\n+\tgit commit -m \"Add files\" &&\n+\n+\t# If Watchman exists, watch the work tree and attempt a query.\n+\tif test_have_prereq WATCHMAN; then\n+\t\twatchman watch \"$GIT_WORK_TREE\" &&\n+\t\twatchman watch-list | grep -q -F \"$GIT_WORK_TREE\"\n+\tfi\n '\n \n test_expect_success \"setup for fsmonitor\" '\n@@ -105,17 +111,13 @@ test_expect_success \"setup for fsmonitor\" '\n \telse\n \t\t#\n \t\t# Choose integration script based on existence of Watchman.\n-\t\t# If Watchman exists, watch the work tree and attempt a query.\n-\t\t# If everything succeeds, use Watchman integration script,\n-\t\t# else fall back to an empty integration script.\n+\t\t# Fall back to an empty integration script.\n \t\t#\n \t\tmkdir .git/hooks &&\n \t\tif test_have_prereq WATCHMAN\n \t\tthen\n \t\t\tINTEGRATION_SCRIPT=\".git/hooks/fsmonitor-watchman\" &&\n-\t\t\tcp \"$TEST_DIRECTORY/../templates/hooks--fsmonitor-watchman.sample\" \"$INTEGRATION_SCRIPT\" &&\n-\t\t\twatchman watch \"$GIT_WORK_TREE\" &&\n-\t\t\twatchman watch-list | grep -q -F \"$GIT_WORK_TREE\"\n+\t\t\tcp \"$TEST_DIRECTORY/../templates/hooks--fsmonitor-watchman.sample\" \"$INTEGRATION_SCRIPT\"\n \t\telse\n \t\t\tINTEGRATION_SCRIPT=\".git/hooks/fsmonitor-empty\" &&\n \t\t\twrite_script \"$INTEGRATION_SCRIPT\"<<-\\EOF\n-- \ngitgitgadget\n\n"},{"id":"408444","messageId":"02c2afcb96b7eded3a48cdffb60c5c17f3a7d61a.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 05/10] t/perf/fsmonitor: shorten DESC to basename","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:48Z","receivedAt":"2020-10-26T19:33:40Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nThe full name is lengthy and makes it hard to read\nBefore:\n7519.3: status (fsmonitor=/home/nipunn/src/server/.git/hooks/rs-git-fsmonitor) 0.02(0.01+0.00)\n\nAfter\n7519.3: status (fsmonitor=rs-git-fsmonitor) 0.03(0.02+0.00)\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 6 +++++-\n 1 file changed, 5 insertions(+), 1 deletion(-)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex aa6b82d756..2c817db1ae 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -141,7 +141,11 @@ test_perf_w_drop_caches () {\n }\n \n test_fsmonitor_suite() {\n-\tDESC=\"fsmonitor=$INTEGRATION_SCRIPT\"\n+\tif test -n \"$INTEGRATION_SCRIPT\"; then\n+\t\tDESC=\"fsmonitor=$(basename $INTEGRATION_SCRIPT)\"\n+\telse\n+\t\tDESC=\"fsmonitor=disabled\"\n+\tfi\n \n \ttest_perf_w_drop_caches \"status ($DESC)\" '\n \t\tgit status\n-- \ngitgitgadget\n\n"},{"id":"408445","messageId":"60b5354a35faeb98d11f7f742c708ccc7cb38536.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 04/10] t/perf/fsmonitor: factor description out for readability","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:47Z","receivedAt":"2020-10-26T19:33:42Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nThere was much duplication here. Prepares for making\nchanges to the description.\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 22 ++++++++++++----------\n 1 file changed, 12 insertions(+), 10 deletions(-)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex 88b3717e2a..aa6b82d756 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -141,43 +141,45 @@ test_perf_w_drop_caches () {\n }\n \n test_fsmonitor_suite() {\n-\ttest_perf_w_drop_caches \"status (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\tDESC=\"fsmonitor=$INTEGRATION_SCRIPT\"\n+\n+\ttest_perf_w_drop_caches \"status ($DESC)\" '\n \t\tgit status\n \t'\n \n-\ttest_perf_w_drop_caches \"status -uno (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\ttest_perf_w_drop_caches \"status -uno ($DESC)\" '\n \t\tgit status -uno\n \t'\n \n-\ttest_perf_w_drop_caches \"status -uall (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\ttest_perf_w_drop_caches \"status -uall ($DESC)\" '\n \t\tgit status -uall\n \t'\n \n-\ttest_perf_w_drop_caches \"diff (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\ttest_perf_w_drop_caches \"diff ($DESC)\" '\n \t\tgit diff\n \t'\n \n-\ttest_perf_w_drop_caches \"diff -- 0_files (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\ttest_perf_w_drop_caches \"diff -- 0_files ($DESC)\" '\n \t\tgit diff -- 1_file\n \t'\n \n-\ttest_perf_w_drop_caches \"diff -- 10_files (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\ttest_perf_w_drop_caches \"diff -- 10_files ($DESC)\" '\n \t\tgit diff -- 10_files\n \t'\n \n-\ttest_perf_w_drop_caches \"diff -- 100_files (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\ttest_perf_w_drop_caches \"diff -- 100_files ($DESC)\" '\n \t\tgit diff -- 100_files\n \t'\n \n-\ttest_perf_w_drop_caches \"diff -- 1000_files (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\ttest_perf_w_drop_caches \"diff -- 1000_files ($DESC)\" '\n \t\tgit diff -- 1000_files\n \t'\n \n-\ttest_perf_w_drop_caches \"diff -- 10000_files (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\ttest_perf_w_drop_caches \"diff -- 10000_files ($DESC)\" '\n \t\tgit diff -- 10000_files\n \t'\n \n-\ttest_perf_w_drop_caches \"add (fsmonitor=$INTEGRATION_SCRIPT)\" '\n+\ttest_perf_w_drop_caches \"add ($DESC)\" '\n \t\tgit add  --all\n \t'\n }\n-- \ngitgitgadget\n\n"},{"id":"408446","messageId":"pull.772.git.1603740773.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":null,"subject":"[PATCH 00/10] Update fsmonitor perf suite to support integration comparisons","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:43Z","receivedAt":"2020-10-26T19:33:51Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"This patch series builds upon nk/diff-files-vs-fsmonitor\n\nThis builds up to a comparison between our perl script and \nhttps://github.com/jgavris/rs-git-fsmonitor. Stats on the comparison are in\nthe final commit message. I've found that rs-git-fsmonitor saves 20-30ms off\nof every git command compared to the perl script.\n\nIt may provide some motivation for supplying a faster implementation of\nfsmonitor-watchman.\n\nNipunn Koorapati (10):\n  t/perf/fsmonitor: separate one time repo initialization\n  t/perf/fsmonitor: move watchman setup to one-time-repo-setup\n  t/perf/fsmonitor: improve error message if typoing hook name\n  t/perf/fsmonitor: factor description out for readability\n  t/perf/fsmonitor: shorten DESC to basename\n  t/perf/fsmonitor: silence initial git commit\n  t/perf/fsmonitor: factor setup for fsmonitor into function\n  t/perf/fsmonitor: initialize test with git reset\n  t/perf/fsmonitor: perf comparison of multiple fsmonitor integrations\n  t/perf/fsmonitor: add benchmark for dirty status\n\n t/perf/p7519-fsmonitor.sh | 94 ++++++++++++++++++++++++++-------------\n 1 file changed, 63 insertions(+), 31 deletions(-)\n\n\nbase-commit: 2bfa953e5daf3253cc5fae2de2c68fbd206dfe12\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-772%2Fnipunn1313%2Fnk%2Ffsmonitor-perf-suite-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-772/nipunn1313/nk/fsmonitor-perf-suite-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/772\n-- \ngitgitgadget\n"},{"id":"408447","messageId":"a9d989e07428149a5fbc51aa2f5193cff0f1a31f.1603740773.git.gitgitgadget@gmail.com","threadId":"54511","inReplyTo":"pull.772.git.1603740773.gitgitgadget@gmail.com","subject":"[PATCH 01/10] t/perf/fsmonitor: separate one time repo initialization","fromName":"Nipunn Koorapati via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2020-10-26T19:32:44Z","receivedAt":"2020-10-26T19:34:02Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"From: Nipunn Koorapati <nipunn@dropbox.com>\n\nIn preparation for testing multiple fsmonitor hooks\n\nSigned-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n---\n t/perf/p7519-fsmonitor.sh | 19 +++++++++++--------\n 1 file changed, 11 insertions(+), 8 deletions(-)\n\ndiff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\nindex fb20fe0937..23755012df 100755\n--- a/t/perf/p7519-fsmonitor.sh\n+++ b/t/perf/p7519-fsmonitor.sh\n@@ -68,7 +68,7 @@ then\n \tfi\n fi\n \n-test_expect_success \"setup for fsmonitor\" '\n+test_expect_success \"one time repo setup\" '\n \t# set untrackedCache depending on the environment\n \tif test -n \"$GIT_PERF_7519_UNTRACKED_CACHE\"\n \tthen\n@@ -88,6 +88,16 @@ test_expect_success \"setup for fsmonitor\" '\n \t\tgit config core.splitIndex \"$GIT_PERF_7519_SPLIT_INDEX\"\n \tfi &&\n \n+\tmkdir 1_file 10_files 100_files 1000_files 10000_files &&\n+\tfor i in $(test_seq 1 10); do touch 10_files/$i; done &&\n+\tfor i in $(test_seq 1 100); do touch 100_files/$i; done &&\n+\tfor i in $(test_seq 1 1000); do touch 1000_files/$i; done &&\n+\tfor i in $(test_seq 1 10000); do touch 10000_files/$i; done &&\n+\tgit add 1_file 10_files 100_files 1000_files 10000_files &&\n+\tgit commit -m \"Add files\"\n+'\n+\n+test_expect_success \"setup for fsmonitor\" '\n \t# set INTEGRATION_SCRIPT depending on the environment\n \tif test -n \"$GIT_PERF_7519_FSMONITOR\"\n \tthen\n@@ -115,13 +125,6 @@ test_expect_success \"setup for fsmonitor\" '\n \n \tgit config core.fsmonitor \"$INTEGRATION_SCRIPT\" &&\n \tgit update-index --fsmonitor &&\n-\tmkdir 1_file 10_files 100_files 1000_files 10000_files &&\n-\tfor i in $(test_seq 1 10); do touch 10_files/$i; done &&\n-\tfor i in $(test_seq 1 100); do touch 100_files/$i; done &&\n-\tfor i in $(test_seq 1 1000); do touch 1000_files/$i; done &&\n-\tfor i in $(test_seq 1 10000); do touch 10000_files/$i; done &&\n-\tgit add 1_file 10_files 100_files 1000_files 10000_files &&\n-\tgit commit -m \"Add files\" &&\n \tgit status  # Warm caches\n '\n \n-- \ngitgitgadget\n\n"},{"id":"408457","messageId":"xmqq1rhkellz.fsf@gitster.c.googlers.com","threadId":"54511","inReplyTo":"79cc61f56adf7769521d2e2ba4c27c1a3bbc1d76.1603740773.git.gitgitgadget@gmail.com","subject":"Re: [PATCH 03/10] t/perf/fsmonitor: improve error message if typoing hook name","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-10-26T21:14:00Z","receivedAt":"2020-10-26T21:14:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Nipunn Koorapati via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: Nipunn Koorapati <nipunn@dropbox.com>\n>\n> Previously - it would silently run the perf suite w/o using\n> fsmonitor - fsmonitor errors are not hard failures.\n> Now it errors loudly.\n>\n> GIT_PERF_7519_FSMONITOR=\"$HOME/rs-git-fsmonitorr\"\n> ./p7519-fsmonitor.sh -i -v\n>\n> fatal: cannot run /home/nipunn/rs-git-fsmonitorr:\n> No such file or directory\n> not ok 2 - setup for fsmonitor\n>\n> Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com>\n> ---\n>  t/perf/p7519-fsmonitor.sh | 4 +++-\n>  1 file changed, 3 insertions(+), 1 deletion(-)\n>\n> diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh\n> index 4030f569cf..88b3717e2a 100755\n> --- a/t/perf/p7519-fsmonitor.sh\n> +++ b/t/perf/p7519-fsmonitor.sh\n> @@ -126,7 +126,9 @@ test_expect_success \"setup for fsmonitor\" '\n>  \tfi &&\n>  \n>  \tgit config core.fsmonitor \"$INTEGRATION_SCRIPT\" &&\n> -\tgit update-index --fsmonitor &&\n> +\tgit update-index --fsmonitor 2>error &&\n> +\tcat error &&\n> +\t[ ! -s error ] && # ensure no silent error\n\nI usually do not review or write t/perf/, but is test_must_be_empty\navailable to you at this point?\n\n>  \tgit status  # Warm caches\n>  '\n"},{"id":"408463","messageId":"CAN8Z4-UXzPueBEyqt=uw1Y-Cd-eguq+8CW5HgqUAkFYtFX3B+g@mail.gmail.com","threadId":"54511","inReplyTo":"xmqq1rhkellz.fsf@gitster.c.googlers.com","subject":"Re: [PATCH 03/10] t/perf/fsmonitor: improve error message if typoing hook name","fromName":"Nipunn Koorapati","fromEmail":"nipunn1313@gmail.com","sentAt":"2020-10-26T22:02:29Z","receivedAt":"2020-10-26T22:02:42Z","isPatch":true,"sender":{"key":"nipunn1313@gmail.com","avatar":"https://gravatar.com/avatar/d0b19cc6499ffcae349d237d7166f5fa0fc29942783a61894ccdb5ee5246ac97?d=mp&s=160"},"body":"> I usually do not review or write t/perf/, but is test_must_be_empty\n> available to you at this point?\n\nEverything in test-lib should be available - so yes! I can try it out\nand switch to it in the next roll of this patch series. I did not\nrealize this helper was available. Thank you.\n--Nipunn\n"}]}