Re: [PATCH v3 24/34] t/perf/p7519: speed up test using "test-tool touch"
- From
Elijah Newren <newren@gmail.com>
- Date
- Jul 13, 2021, 17:36 UTC
- Message-ID
- <CABPp-BF+GiAZVxeC+MAr6pSssRpSi2pNwHLrxUp9HvrOhUBieg@mail.gmail.com>
- In-Reply-To
- <c6793033-9bd4-e108-4a53-56c1dbd24a60@jeffhostetler.com>
On Tue, Jul 13, 2021 at 10:10 AM Jeff Hostetler <git@jeffhostetler.com> wrote:
Show 23 quoted lines
> > On 7/1/21 7:09 PM, Ævar Arnfjörð Bjarmason wrote: > > > > Did you try to replace this with some variant of: > > > > test_seq 1 10000 | xargs touch > > > > Which (depending on your xargs version) would invoke "touch" commands > > with however many argv items it thinks you can handle. > > a quick test on my Windows machine shows that > > test_seq 1 10000 | xargs touch > > takes 3.1 seconds. > > just a simple > > test_seq 1 10000 >/dev/null > > take 0.2 seconds. > > using my test-tool helper cuts that time in half.
Yeah, test_seq is pretty bad; it's just a loop in shell. Is there a 'seq' on windows, and does using it instead of test_seq make things faster with Ævar's suggested command?
I'd really like to modify test_seq to use seq when it's available and fall back to the looping-in-shell when we need to for various platforms.
Maybe it'd even make sense to write a 'test-tool seq' and make test_seq use that just so we can rip out that super lame shell looping.