From: Jonathan Tan <jonathantanmy@google.com>
To: git@vger.kernel.org
Cc: Jonathan Tan <jonathantanmy@google.com>,
peff@peff.net, gitster@pobox.com
Subject: [PATCH] t/perf: export variable used in other blocks
Date: Thu, 2 Mar 2017 11:50:41 -0800 [thread overview]
Message-ID: <20170302195041.1699-1-jonathantanmy@google.com> (raw)
In-Reply-To: <20170228221236.selqkf5wme3fvued@sigill.intra.peff.net>
In p0001, a variable was created in a test_expect_success block to be
used in later test_perf blocks, but was not exported. This caused the
variable to not appear in those blocks (this can be verified by writing
'test -n "$commit"' in those blocks), resulting in a slightly different
invocation than what was intended. Export that variable.
Signed-off-by: Jonathan Tan <jonathantanmy@google.com>
---
Performance indeed does drop significantly with this patch. And I cannot
say "at least this is more correct", because it isn't - as Peff thinks,
it is indeed still not 100% accurate because of the resurfacing-object
issue he mentions (I've verified this by constructing a test that fails
even after this patch set).
Also, since we don't want to unify tree_ and blob_ (for the reason Peff
mentioned in another e-mail), feel free to drop this patch set.
Having said that, while looking at the perf test, I noticed an issue
with a non-exported variable, which is corrected in this patch.
t/perf/p0001-rev-list.sh | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/t/perf/p0001-rev-list.sh b/t/perf/p0001-rev-list.sh
index 16359d51a..ebf172401 100755
--- a/t/perf/p0001-rev-list.sh
+++ b/t/perf/p0001-rev-list.sh
@@ -15,7 +15,8 @@ test_perf 'rev-list --all --objects' '
'
test_expect_success 'create new unreferenced commit' '
- commit=$(git commit-tree HEAD^{tree} -p HEAD)
+ commit=$(git commit-tree HEAD^{tree} -p HEAD) &&
+ test_export commit
'
test_perf 'rev-list $commit --not --all' '
--
2.12.0.rc1.440.g5b76565f74-goog
next prev parent reply other threads:[~2017-03-03 6:58 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-25 1:18 [PATCH 0/3] Test fetch-pack's ability to fetch arbitrary blobs Jonathan Tan
2017-02-25 1:18 ` [PATCH 1/3] revision: unify {tree,blob}_objects in rev_info Jonathan Tan
2017-02-28 21:42 ` Junio C Hamano
2017-02-28 21:59 ` Jeff King
2017-03-02 18:36 ` Junio C Hamano
2017-02-28 22:06 ` Jeff King
2017-02-25 1:18 ` [PATCH 2/3] revision: exclude trees/blobs given commit Jonathan Tan
2017-02-28 21:44 ` Junio C Hamano
2017-02-28 22:12 ` Jeff King
2017-03-02 19:50 ` Jonathan Tan [this message]
2017-03-03 6:45 ` [PATCH] t/perf: export variable used in other blocks Jeff King
2017-03-03 7:14 ` [PATCH] t/perf: use $MODERN_GIT for all repo-copying steps Jeff King
2017-03-03 7:36 ` [PATCH] t/perf: add fallback for pre-bin-wrappers versions of git Jeff King
2017-03-03 18:51 ` [PATCH] t/perf: export variable used in other blocks Junio C Hamano
2017-03-03 22:31 ` Jeff King
2017-02-28 23:12 ` [PATCH 2/3] revision: exclude trees/blobs given commit Junio C Hamano
2017-02-25 1:18 ` [PATCH 3/3] upload-pack: compute blob reachability correctly Jonathan Tan
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=20170302195041.1699-1-jonathantanmy@google.com \
--to=jonathantanmy@google.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
/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).