git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Hostetler <git@jeffhostetler.com>
To: Junio C Hamano <gitster@pobox.com>,
	Jeff Hostetler via GitGitGadget <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Jeff Hostetler <jeffhost@microsoft.com>
Subject: Re: [PATCH 01/11] p7519: use xargs -0 rather than -d in test
Date: Tue, 2 Feb 2021 13:16:36 -0500	[thread overview]
Message-ID: <b2c548b7-f641-2398-c200-d774af9cf628@jeffhostetler.com> (raw)
In-Reply-To: <xmqqsg6fid57.fsf@gitster.c.googlers.com>



On 2/1/21 6:25 PM, Junio C Hamano wrote:
> "Jeff Hostetler via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
>> From: Jeff Hostetler <jeffhost@microsoft.com>
>>
>> The Mac version of xargs does not support the "-d" option.  Convert the test
>> setup to pipe the data set thru `lf_to_nul | xargs -0` instead.
> 
> "xargs -0" is not all that portable, either, and neither is "touch -h".
> 
> But since the t/perf stuff already depends on having GNU toolchain
> anyway, I can be persuaded to believe that it is OK.
> 
> Do we know that this part runs much later than the staged files are
> last touched, so that these uses of "touch" actually are effective
> to make the paths stat-dirty?  Otherwise, we may be just "touch"ing
> them with the timestamp they already have after all.

I'm not sure now that you mention it.  I suppose on modern filesystems
that have mtimes with nanosecond fields we could (are) assuming that
"touch" is actually doing something.  On older filesystems (such as
FAT32), you're right it is probably not doing anything at the speed
that the test runs.

TBH I'm not sure that the test needs the "-h".  Symlinks are not that
common and it shouldn't affect the timings that much if there are a few.

I'm not sure what to do about "-0".  Not even "--null" is portable.

Let me do a little digging here.

> 
> Thanks.
> 
>> Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
>> ---
>>   t/perf/p7519-fsmonitor.sh | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh
>> index 9b43342806b..7bb37e9a6c1 100755
>> --- a/t/perf/p7519-fsmonitor.sh
>> +++ b/t/perf/p7519-fsmonitor.sh
>> @@ -165,7 +165,7 @@ test_fsmonitor_suite() {
>>   	'
>>   
>>   	test_perf_w_drop_caches "status (dirty) ($DESC)" '
>> -		git ls-files | head -100000 | xargs -d "\n" touch -h &&
>> +		git ls-files | head -100000 | lf_to_nul | xargs -0 touch -h &&
>>   		git status
>>   	'

  reply	other threads:[~2021-02-02 18:22 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 22:02 [PATCH 00/11] FSMonitor Preliminary Commits Jeff Hostetler via GitGitGadget
2021-02-01 22:02 ` [PATCH 01/11] p7519: use xargs -0 rather than -d in test Jeff Hostetler via GitGitGadget
2021-02-01 23:25   ` Junio C Hamano
2021-02-02 18:16     ` Jeff Hostetler [this message]
2021-02-02 21:23       ` Junio C Hamano
2021-02-01 22:02 ` [PATCH 02/11] p7519: fix watchman watch-list test on Windows Jeff Hostetler via GitGitGadget
2021-02-01 22:02 ` [PATCH 03/11] p7519: move watchman cleanup earlier in the test Jeff Hostetler via GitGitGadget
2021-02-01 22:02 ` [PATCH 04/11] p7519: add trace logging during perf test Jeff Hostetler via GitGitGadget
2021-02-01 22:02 ` [PATCH 05/11] preload-index: log the number of lstat calls to trace2 Jeff Hostetler via GitGitGadget
2021-02-01 22:02 ` [PATCH 06/11] read-cache: " Jeff Hostetler via GitGitGadget
2021-02-01 22:02 ` [PATCH 07/11] read-cache: log the number of scanned files " Jeff Hostetler via GitGitGadget
2021-02-01 22:02 ` [PATCH 08/11] fsmonitor: log invocation of FSMonitor hook " Jeff Hostetler via GitGitGadget
2021-02-01 22:02 ` [PATCH 09/11] fsmonitor: log FSMN token when reading and writing the index Jeff Hostetler via GitGitGadget
2021-02-01 22:02 ` [PATCH 10/11] fsmonitor: allow all entries for a folder to be invalidated Kevin Willford via GitGitGadget
2021-02-01 22:02 ` [PATCH 11/11] fsmonitor: refactor initialization of fsmonitor_last_update token Jeff Hostetler via GitGitGadget
2021-02-03 15:34 ` [PATCH v2 00/11] FSMonitor Preliminary Commits Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 01/11] p7519: do not rely on "xargs -d" in test Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 02/11] p7519: fix watchman watch-list test on Windows Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 03/11] p7519: move watchman cleanup earlier in the test Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 04/11] p7519: add trace logging during perf test Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 05/11] preload-index: log the number of lstat calls to trace2 Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 06/11] read-cache: " Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 07/11] read-cache: log the number of scanned files " Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 08/11] fsmonitor: log invocation of FSMonitor hook " Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 09/11] fsmonitor: log FSMN token when reading and writing the index Jeff Hostetler via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 10/11] fsmonitor: allow all entries for a folder to be invalidated Kevin Willford via GitGitGadget
2021-02-03 15:34   ` [PATCH v2 11/11] fsmonitor: refactor initialization of fsmonitor_last_update token Jeff Hostetler via GitGitGadget
2021-02-16 19:00   ` [PATCH v2 00/11] FSMonitor Preliminary Commits Jeff Hostetler
2021-02-17  1:54     ` Junio C Hamano
2021-02-03 21:19 ` [PATCH " Taylor Blau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b2c548b7-f641-2398-c200-d774af9cf628@jeffhostetler.com \
    --to=git@jeffhostetler.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=gitster@pobox.com \
    --cc=jeffhost@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).