From: "René Scharfe" <l.s.r@web.de>
To: Git List <git@vger.kernel.org>
Cc: Jeff Hostetler <git@jeffhostetler.com>,
Jeff Hostetler <jeffhost@microsoft.com>
Subject: [PATCH 5/5] p0004: don't error out if test repo is too small
Date: Sat, 13 May 2017 18:03:50 +0200 [thread overview]
Message-ID: <ca844223-bb04-8885-2f33-2c3e9c5a5e3c@web.de> (raw)
In-Reply-To: <9b574d73-8dfb-f0b3-dc3e-d593726a8f0e@web.de>
Repositories with less than 4000 entries are always handled using a
single thread, causing test-lazy-init-name-hash --multi to error out.
Don't abort the whole test script in that case, but simply skip the
multi-threaded performance check. We can still use it to compare the
single-threaded speed of different versions in that case.
Signed-off-by: Rene Scharfe <l.s.r@web.de>
---
t/perf/p0004-lazy-init-name-hash.sh | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/t/perf/p0004-lazy-init-name-hash.sh b/t/perf/p0004-lazy-init-name-hash.sh
index 3c2135a185..8de5a98cfc 100755
--- a/t/perf/p0004-lazy-init-name-hash.sh
+++ b/t/perf/p0004-lazy-init-name-hash.sh
@@ -8,10 +8,13 @@ test_checkout_worktree
test_expect_success 'verify both methods build the same hashmaps' '
test-lazy-init-name-hash --dump --single >out.single &&
- test-lazy-init-name-hash --dump --multi >out.multi &&
- sort <out.single >sorted.single &&
- sort <out.multi >sorted.multi &&
- test_cmp sorted.single sorted.multi
+ if test-lazy-init-name-hash --dump --multi >out.multi
+ then
+ test_set_prereq REPO_BIG_ENOUGH_FOR_MULTI &&
+ sort <out.single >sorted.single &&
+ sort <out.multi >sorted.multi &&
+ test_cmp sorted.single sorted.multi
+ fi
'
test_expect_success 'calibrate' '
@@ -46,7 +49,7 @@ test_perf "single-threaded, $desc" "
test-lazy-init-name-hash --single --count=$count
"
-test_perf "multi-threaded, $desc" "
+test_perf REPO_BIG_ENOUGH_FOR_MULTI "multi-threaded, $desc" "
test-lazy-init-name-hash --multi --count=$count
"
--
2.12.2
next prev parent reply other threads:[~2017-05-13 16:04 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-13 15:55 [PATCH 0/5] p0004: support being called by t/perf/run René Scharfe
2017-05-13 15:59 ` [PATCH 1/5] p0004: simplify calls of test-lazy-init-name-hash René Scharfe
2017-05-13 16:00 ` [PATCH 2/5] p0004: avoid using pipes René Scharfe
2017-05-13 16:02 ` [PATCH 3/5] p0004: use test_perf René Scharfe
2017-05-13 16:03 ` [PATCH 4/5] p0004: don't abort if multi-threaded is too slow René Scharfe
2017-05-13 16:03 ` René Scharfe [this message]
2017-05-15 13:14 ` [PATCH 0/5] p0004: support being called by t/perf/run Jeff Hostetler
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=ca844223-bb04-8885-2f33-2c3e9c5a5e3c@web.de \
--to=l.s.r@web.de \
--cc=git@jeffhostetler.com \
--cc=git@vger.kernel.org \
--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).