unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org
Subject: Re: [PATCH] test/test-lib.sh: execute basename(1)s lazier in test_expect_equal_file ()
Date: Wed, 26 Oct 2016 23:39:28 +0300	[thread overview]
Message-ID: <m28tta6e0v.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87y41bvs2w.fsf@tethera.net>

On Wed, Oct 26 2016, David Bremner <david@tethera.net> wrote:

> Tomi Ollila <tomi.ollila@iki.fi> writes:
>
>> Moved the 2 basename(1) executions to the test failure branch in
>> test_expect_equal_file ().
>>
>> The output of basename(1) executions in function test_expect_equal_file ()
>> are only used when tests fails -- when all tests pass these 2 basename(1)
>> executions are no longer done at all.
>
> I challenge you to measure the improvement; pushed to master anyway. ;)

if 1 fork(2) takes 1 millisecond, then the full test suite runs 1 second
faster (+ some gain from dropping 500 execve(basename) calls).
So notmuch from execute time viewpoint.
(I actually happen to have suitable LD_PRELOAD library which could ne used
to measure execution times so I might accept the challenge ;D)

but this also reduces noise a bit when debugging test suite problems with 
`set -x` -- for human reader that is an improvement... there would be
somuch more to be improved there but oh well... ;/

Tomi

>
> d

      reply	other threads:[~2016-10-26 20:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-09 20:36 [PATCH] test/test-lib.sh: execute basename(1)s lazier in test_expect_equal_file () Tomi Ollila
2016-10-26  1:04 ` David Bremner
2016-10-26 20:39   ` Tomi Ollila [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

  List information: https://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m28tta6e0v.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.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.
Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.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).