From: Jeff King <peff@peff.net>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [RFH] git cherry vs. git rev-list --cherry, or: Why does "..." suck?
Date: Wed, 23 Mar 2011 13:19:12 -0400 [thread overview]
Message-ID: <20110323171912.GD30337@sigill.intra.peff.net> (raw)
In-Reply-To: <4D889119.3020009@drmicha.warpmail.net>
On Tue, Mar 22, 2011 at 01:07:53PM +0100, Michael J Gruber wrote:
> I don't get this:
>
> git cherry A B: 0.4s
> git rev-list --cherry A...B: 1.7s
> (more details below)
>
> This makes "rev-list --cherry" almost unacceptable as a replacement. But
> I'd like to understand this difference (and maybe do something about
> it). I'm lost with gprof, but here are more details on the timing:
I don't have much to say on the problem at hand, but have you tried
using the "perf" tool from the kernel to measure? These days it ships in
linux-tools-2.6.x in Debian unstable; I don't know about other distros.
You can do this:
perf record git cherry $A $B >/dev/null
perf record git rev-list --cherry $A...$B >/dev/null
perf diff
to get a list of the hot-spots with the time differences between the two
runs (along with "perf report" and "perf annotate" to get more
information).
Disclaimer: I am very new to perf, so I may be misleading you about how
useful the "diff" would be. In particular, it seems to be based on a
percentages of time spent between two runs. Which is great for two runs
of the same program calling very similar functions. But for two programs
calling _mostly_ the same functions, I don't know how misleading it is.
-Peff
prev parent reply other threads:[~2011-03-23 17:19 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-22 12:07 [RFH] git cherry vs. git rev-list --cherry, or: Why does "..." suck? Michael J Gruber
2011-03-23 16:46 ` Michael J Gruber
2011-03-23 18:20 ` Junio C Hamano
2011-03-24 7:38 ` Michael J Gruber
2011-03-23 17:19 ` Jeff King [this message]
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=20110323171912.GD30337@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=git@drmicha.warpmail.net \
--cc=git@vger.kernel.org \
/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).