Re: [PATCH v7 24/29] t/perf/p7519: speed up test on Windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 3/22/22 2:43 PM, Ævar Arnfjörð Bjarmason wrote:

On Tue, Mar 22 2022, Jeff Hostetler via GitGitGadget wrote:

From: Jeff Hostetler <jeffhost@xxxxxxxxxxxxx>

Change p7519 to use `test_seq` and `xargs` rather than a `for` loop
to touch thousands of files.  This takes minutes off of test runs
on Windows because of process creation overhead.

Signed-off-by: Jeff Hostetler <jeffhost@xxxxxxxxxxxxx>
Signed-off-by: Junio C Hamano <gitster@xxxxxxxxx>
---
  t/perf/p7519-fsmonitor.sh | 32 ++++++++++++++++++++------------
  1 file changed, 20 insertions(+), 12 deletions(-)

diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh
index c8be58f3c76..0611e533951 100755
--- a/t/perf/p7519-fsmonitor.sh
+++ b/t/perf/p7519-fsmonitor.sh
@@ -72,7 +72,7 @@ then
[...]
-trace_stop() {
+trace_stop () {
  	if test -n "$GIT_PERF_7519_TRACE"
  	then
  		unset GIT_TRACE2_PERF
  	fi
  }

(I think I noted in a previous version): Would be nice to have an
optimization change not do unrelated refactoring....

In V4 24/29, Junio pushed a fixup! commit onto my branch to
add the space between the function name and the parens of the
function that I added.  And fixed the other existing instances
while he was at it.  I squashed that down into my branch during
cleanups between V4 and V5.  It seemed less trouble/noise than
splitting it into two commits.  (I was also at the 30 commit
limit of GGG in V5 and V6, so that was another reason not to
split it.)

Now that I'm at 29 in V7, I suppose that I could split it.




+touch_files () {
+	n=$1
+	d="$n"_files
+
+	(cd $d ; test_seq 1 $n | xargs touch )


...and here we don't &&-chain.


Right, thanks.

Jeff




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux