From: Derrick Stolee <stolee@gmail.com>
To: Jeff King <peff@peff.net>
Cc: Thomas Braun <thomas.braun@virtuell-zuhause.de>,
Derrick Stolee <dstolee@microsoft.com>,
git@vger.kernel.org
Subject: Re: [PATCH] t7900: speed up expensive test
Date: Thu, 3 Dec 2020 10:23:57 -0500 [thread overview]
Message-ID: <b3bfa8df-f750-3dc9-d4e5-1bbd6a636eeb@gmail.com> (raw)
In-Reply-To: <X8cAXHJRm+Xz9PFM@coredump.intra.peff.net>
On 12/1/2020 9:47 PM, Jeff King wrote:
> Subject: [PATCH] t7900: speed up expensive test
>
> A test marked with EXPENSIVE creates two 2.5GB files and adds them to
> the repository. This takes 194s to run on my machine, versus 2s when the
> EXPENSIVE prereq isn't set. We can trim this down a bit by doing two
> things:
>
> - use "git commit --quiet" to avoid spending time generating a diff
> summary (this actually only helps for the second commit, but I've
> added it here to both for consistency). This shaves off 8s.
>
> - set core.compression to 0. We know these files are full of random
> bytes, and so won't compress (that's the point of the test!).
> Spending cycles on zlib is pointless. This shaves off 122s.
>
> After this, my total time to run the script is 64s. That won't help
> normal runs without GIT_TEST_LONG set, of course, but it's easy enough
> to do.
I'm happy with these easy fixes to make the test faster without
changing any of the important behavior. Thanks!
> Signed-off-by: Jeff King <peff@peff.net>
> ---
> t/t7900-maintenance.sh | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/t/t7900-maintenance.sh b/t/t7900-maintenance.sh
> index d9e68bb2bf..d9a02df686 100755
> --- a/t/t7900-maintenance.sh
> +++ b/t/t7900-maintenance.sh
> @@ -239,13 +239,15 @@ test_expect_success 'incremental-repack task' '
> '
>
> test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
> + test_config core.compression 0 &&
> +
> for i in $(test_seq 1 5)
> do
> test-tool genrandom foo$i $((512 * 1024 * 1024 + 1)) >>big ||
> return 1
> done &&
> git add big &&
> - git commit -m "Add big file (1)" &&
> + git commit -qm "Add big file (1)" &&
>
> # ensure any possible loose objects are in a pack-file
> git maintenance run --task=loose-objects &&
> @@ -257,7 +259,7 @@ test_expect_success EXPENSIVE 'incremental-repack 2g limit' '
> return 1
> done &&
> git add big &&
> - git commit -m "Add big file (2)" &&
> + git commit -qm "Add big file (2)" &&
>
> # ensure any possible loose objects are in a pack-file
> git maintenance run --task=loose-objects &&
>
next prev parent reply other threads:[~2020-12-03 15:27 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-13 5:06 [PATCH 0/5] handling 4GB .idx files Jeff King
2020-11-13 5:06 ` [PATCH 1/5] compute pack .idx byte offsets using size_t Jeff King
2020-11-13 5:07 ` [PATCH 2/5] use size_t to store pack .idx byte offsets Jeff King
2020-11-13 5:07 ` [PATCH 3/5] fsck: correctly compute checksums on idx files larger than 4GB Jeff King
2020-11-13 5:07 ` [PATCH 4/5] block-sha1: take a size_t length parameter Jeff King
2020-11-13 5:07 ` [PATCH 5/5] packfile: detect overflow in .idx file size checks Jeff King
2020-11-13 11:02 ` Johannes Schindelin
2020-11-15 14:43 ` [PATCH 0/5] handling 4GB .idx files Thomas Braun
2020-11-16 4:10 ` Jeff King
2020-11-16 13:30 ` Derrick Stolee
2020-11-16 23:49 ` Jeff King
2020-11-30 22:57 ` Thomas Braun
2020-12-01 11:23 ` Jeff King
2020-12-01 11:39 ` t7900's new expensive test Jeff King
2020-12-01 20:55 ` Derrick Stolee
2020-12-02 2:47 ` [PATCH] t7900: speed up " Jeff King
2020-12-03 15:23 ` Derrick Stolee [this message]
2020-12-01 18:27 ` [PATCH 0/5] handling 4GB .idx files Taylor Blau
2020-12-02 13:12 ` Jeff King
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b3bfa8df-f750-3dc9-d4e5-1bbd6a636eeb@gmail.com \
--to=stolee@gmail.com \
--cc=dstolee@microsoft.com \
--cc=git@vger.kernel.org \
--cc=peff@peff.net \
--cc=thomas.braun@virtuell-zuhause.de \
/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.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
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 read-only IMAP folder(s) and NNTP newsgroup(s).