git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: Junio C Hamano <gitster@pobox.com>,
	Daniels Umanovskis <daniels@umanovskis.se>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH v4] branch: introduce --show-current display option
Date: Thu, 18 Oct 2018 10:19:30 -0400	[thread overview]
Message-ID: <CAPig+cRbH0xQDg-acGnHs5cAQKueaAfPFF+AXUF2Gq75KqNupg@mail.gmail.com> (raw)
In-Reply-To: <nycvar.QRO.7.76.6.1810181146250.4546@tvgsbejvaqbjf.bet>

On Thu, Oct 18, 2018 at 5:51 AM Johannes Schindelin
<Johannes.Schindelin@gmx.de> wrote:
> On Wed, 17 Oct 2018, Eric Sunshine wrote:
> > On Wed, Oct 17, 2018 at 6:18 AM Johannes Schindelin <Johannes.Schindelin@gmx.de> wrote:
> > > My suspicion: it is essentially the `(exit 117)` that adds about 100ms to
> > > every of those 67 test cases.
> >
> > The subshell chain-linter adds a 'sed' and 'grep' invocation to each test which doesn't help. (v1 of the subshell chain-linter only added a 'sed', but that changed with v2.)
> > You could disable the subshell chain-linter like this if you want test the (exit 117) goop in isolation:
>
> You're right! This is actually responsible for about five of those seven
> seconds. The subshell still hurts a little, as it means that every single
> of the almost 20,000 test cases we have gets slowed down by ~0.03s, which
> amounts to almost 10 minutes.
>
> This is "only" for the Windows phase of our Continuous Testing, of course.
> Yet I think we can do better than this.
>
> How difficult/involved, do you think, would it be to add a t/helper/
> command for chain linting?

Probably more effort than it's worth, and it would only save one
process invocation.

Since the  subshell portion of the chain-linting is done by pure
textual inspection, an alternative I had considered was to just
perform it as a preprocess over the entire test suite, much like the
other t/Makefile "test-lint" targets. In other words, the entire test
suite might be tested in one go with something like this:

    sed -f chainlint.sed t*.sh | grep -q '?![A-Z][A-Z]*?!' &&
        echo "BROKEN &&-chain"

That won't work today since chainlint.sed isn't written to understand
everything which we might see outside of a test_expect_*, but doing it
that way is within the realm of possibility. There were two reasons
why I didn't pursue that approach.

First, although I was expecting Windows folks to complain (or at least
speak up) about the extra 'sed' and 'grep', nobody did, so my
impression was that those two extra commands were likely lost in the
noise of the rest of the boilerplate commands invoked by
test_expect_success(), test_run_(), test_eval_(), etc., and by
whatever expensive commands are invoked by each test itself. Second,
the top-level &&-chain "(exit 117)" linting kicks in even when you run
a single test script manually, say after editing a test, which is
exactly when you want to discover that you botched a &&-chain, so it
seemed a good idea for the subshell &&-chain linter to follow suit.
The t/Makefile "test-lint" targets, on the other hand, don't kick in
when running test scripts in isolation.

However, a pragmatic way to gain back those 10 minutes might be simply
to disable the chain-linter for continuous integration testing on
Windows, but leave it enabled on other platforms. This way, we'd still
catch broken &&-chains, with the exception of tests which are specific
to Windows, of which I think there are very few.

  reply	other threads:[~2018-10-18 14:19 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-10 20:54 [PATCH v2 0/1] branch: introduce --show-current display option Daniels Umanovskis
2018-10-10 20:54 ` [PATCH v2 1/1] " Daniels Umanovskis
2018-10-11  0:34   ` Jeff King
2018-10-11 15:43     ` Rafael Ascensão
2018-10-11 16:36       ` Daniels Umanovskis
2018-10-11 17:51         ` Jeff King
2018-10-11 20:35           ` Rafael Ascensão
2018-10-11 20:46             ` Daniels Umanovskis
2018-10-11 20:53             ` Jeff King
2018-10-11 22:34               ` Rafael Ascensão
2018-10-11  6:54   ` Junio C Hamano
2018-10-11 17:29     ` Daniels Umanovskis
2018-10-11 17:52       ` Jeff King
2018-10-11 22:20     ` [PATCH v3] " Daniels Umanovskis
2018-10-11 23:15       ` Junio C Hamano
2018-10-11 23:31         ` Daniels Umanovskis
2018-10-12 13:33         ` [PATCH v4] " Daniels Umanovskis
2018-10-12 13:43           ` Eric Sunshine
2018-10-16 23:09             ` Junio C Hamano
2018-10-16 23:26               ` Eric Sunshine
2018-10-17 10:18                 ` Johannes Schindelin
2018-10-17 10:39                   ` Eric Sunshine
2018-10-18  9:51                     ` Johannes Schindelin
2018-10-18 14:19                       ` Eric Sunshine [this message]
2018-10-16  5:59           ` Junio C Hamano
2018-10-17  9:39           ` Rafael Ascensão
2018-10-17 17:36             ` Daniels Umanovskis
2018-10-11 22:53   ` [PATCH v2 1/1] " SZEDER Gábor
2018-10-11 22:56     ` SZEDER Gábor
2018-10-11 22:58       ` Daniels Umanovskis

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=CAPig+cRbH0xQDg-acGnHs5cAQKueaAfPFF+AXUF2Gq75KqNupg@mail.gmail.com \
    --to=sunshine@sunshineco.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=daniels@umanovskis.se \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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.
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).