From: Thomas Rast <trast@student.ethz.ch>
To: Neal Kreitzinger <nkreitzinger@gmail.com>
Cc: <git@vger.kernel.org>
Subject: Re: how to benchmark git commands
Date: Thu, 21 Jun 2012 09:28:40 +0200 [thread overview]
Message-ID: <87k3z1rumv.fsf@thomas.inf.ethz.ch> (raw)
In-Reply-To: <jrt88s$h70$1@dough.gmane.org> (Neal Kreitzinger's message of "Wed, 20 Jun 2012 14:28:28 -0500")
Neal Kreitzinger <nkreitzinger@gmail.com> writes:
> I want to benchmark how long it takes commands like git-gc, git-fsck,
> etc. to run against our canonical repo. What is the correct way to do
> this? I am being asked how much time such commands would add to
> automated on-demand push scripts.
Umm, what's wrong with
$ time git fsck
The bigger question is: do you want to measure hot or cold performance?
For most operations it is more useful to measure the hot performance, as
the repo will be hot anyway. But in the fsck case I wouldn't be so
sure; it's entirely possible that it "usually" faults a bunch of loose
objects that were otherwise unused, taking some extra time. So there
may be some value in first running (as root)
$ echo 3 >/proc/sys/vm/drop_caches
to get cold-cache measurements.
Besides, if you feel like properly evaluating performance in your
repository, you can look in t/perf/README. Then point GIT_PERF_REPO at
your repo of choice, and write tests as needed (for example, there is
currently no perf test for fsck).
That said, both gc and fsck are so slow on even medium-size repositories
(like git.git) that you should probably put them in a nightly cronjob
instead.
--
Thomas Rast
trast@{inf,student}.ethz.ch
prev parent reply other threads:[~2012-06-21 7:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 19:28 how to benchmark git commands Neal Kreitzinger
2012-06-21 7:28 ` Thomas Rast [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=87k3z1rumv.fsf@thomas.inf.ethz.ch \
--to=trast@student.ethz.ch \
--cc=git@vger.kernel.org \
--cc=nkreitzinger@gmail.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).