git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: "Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
	"Christian Couder" <christian.couder@gmail.com>,
	"Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Subject: [PATCH v3 0/6] perf-lib.sh: fix 0baf78e7bc regression, refactor & fix bugs
Date: Tue,  7 May 2019 12:54:28 +0200	[thread overview]
Message-ID: <20190507105434.9600-1-avarab@gmail.com> (raw)
In-Reply-To: <20190506232309.28538-1-avarab@gmail.com>

So here as a 6-parter given some of the feedback on v2. Maybe Jeff
still hates it :), but this time around some of the changes are split
up and should be easier to understand in isolation, as well as some
more "noticed while I was at it" things fixed.

This series ends with outright forbidding the user from directly
setting GIT_TEST_INSTALLED. As discussed it makes things easier for
us, and as noted in 1/6 the demand for that in the wild seems
non-existent, since the way we've been documenting how you could do
that with an environment variable has been broken since 2012.

Ævar Arnfjörð Bjarmason (6):
  perf README: correct docs for 3c8f12c96c regression
  perf aggregate: remove GIT_TEST_INSTALLED from --codespeed
  perf-lib.sh: make "./run <revisions>" use the correct gits
  perf-lib.sh: remove GIT_TEST_INSTALLED from perf-lib.sh
  perf tests: add "bindir" prefix to git tree test results
  perf-lib.sh: forbid the use of GIT_TEST_INSTALLED

 t/perf/README         |  2 +-
 t/perf/aggregate.perl | 17 +++++++++--------
 t/perf/perf-lib.sh    | 18 ++++++++++--------
 t/perf/run            | 43 +++++++++++++++++++++++++++++++++----------
 4 files changed, 53 insertions(+), 27 deletions(-)

Range-diff:
-:  ---------- > 1:  6684dca042 perf README: correct docs for 3c8f12c96c regression
-:  ---------- > 2:  c4e903d898 perf aggregate: remove GIT_TEST_INSTALLED from --codespeed
1:  22a132ed64 ! 3:  9d2d162c64 perf-lib.sh: make "./run <revisions>" use the correct gits
    @@ -40,9 +40,13 @@
         this will subtly fail in test-lib.sh. This has always been the case
         even before 0baf78e7bc, and as documented in t/README the
         GIT_TEST_INSTALLED variable should be set to an absolute path (needs
    -    to be set "to the bindir", which is always absolute). Perhaps that
    -    should be dealt with in the future, but I'm leaving that alone for
    -    now.
    +    to be set "to the bindir", which is always absolute), and the "perf"
    +    framework expects to munge it itself.
    +
    +    Perhaps that should be dealt with in the future to allow manually
    +    setting GIT_TEST_INSTALLED, but as a preceding commit showed the user
    +    can just use the "run" script, which'll also pick the right output
    +    directory for the test results as expected by aggregate.perl.
     
         1. https://public-inbox.org/git/20190502222409.GA15631@sigill.intra.peff.net/
     
2:  f43beb6450 ! 4:  58f1dd3f6f perf-lib.sh: remove GIT_TEST_INSTALLED from perf-lib.sh
    @@ -26,28 +26,28 @@
         We'll just do the right thing because PERF_RESULTS_PREFIX will be
         empty, and test-lib.sh takes care of finding where our git is.
     
    -    Refactoring this revealed a few bugs, e.g. while a relative git path
    -    was supported via e.g.:
    +    Any refactoring of this code needs to change both the shell code and
    +    the Perl code in aggregate.perl, because when running e.g.:
     
             ./run ../../ -- <test>
     
    -    We'd just print out ".." as the header, since we'd always take the
    -    content after the last slash. Now we'll always resolve the absolute
    -    path to something we detect to be be a manually supplied bindir, and
    -    print the full path in the aggregation.
    +    The "../../" path to a relative bindir needs to be munged to a
    +    filename containing the results, and critically aggregate.perl does
    +    not get passed the path to those aggregations, just "../..".
     
    -    There was also a long-standing bug in the codespeed output where the
    -    "environment" for N number of tests would be whatever our
    -    GIT_TEST_INSTALLED had been set to by the last of those N runs. Let's
    -    instead just fall back to "uname -r", which is a more sensible
    -    "environment" than some random build directory path, even for the N=1
    -    case.
    +    Let's fix cases where aggregate.perl would print e.g. ".." in its
    +    report output for this, and "git" for "/home/avar/g/git", i.e. it
    +    would always pick the last element. Now'll always print the full path
    +    instead.
    +
    +    This also makes the code sturdier, e.g. you can feed "../.."  to
    +    "./run" and then an absolute path to the aggregate.perl script, as
    +    long as the absolute path and "../.." resolved to the same directory
    +    printing the aggregation will work.
     
         Also simplify the "[_*]" on the RHS of "tr -c", we're trimming
         everything to "_", so we don't need that.
     
    -    https://public-inbox.org/git/20190502222409.GA15631@sigill.intra.peff.net/
    -
         Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
     
      diff --git a/t/perf/aggregate.perl b/t/perf/aggregate.perl
    @@ -80,16 +80,6 @@
      	my $prefix = $dir;
      	$prefix =~ tr/^a-zA-Z0-9/_/c;
      	$prefixes{$dir} = $prefix . '.';
    -@@
    - 		$environment = $reponame;
    - 	} elsif (exists $ENV{GIT_PERF_REPO_NAME} and $ENV{GIT_PERF_REPO_NAME} ne "") {
    - 		$environment = $ENV{GIT_PERF_REPO_NAME};
    --	} elsif (exists $ENV{GIT_TEST_INSTALLED} and $ENV{GIT_TEST_INSTALLED} ne "") {
    --		$environment = $ENV{GIT_TEST_INSTALLED};
    --		$environment =~ s|/bin-wrappers$||;
    - 	} else {
    - 		$environment = `uname -r`;
    - 		chomp $environment;
     
      diff --git a/t/perf/perf-lib.sh b/t/perf/perf-lib.sh
      --- a/t/perf/perf-lib.sh
-:  ---------- > 5:  64df9157a4 perf tests: add "bindir" prefix to git tree test results
-:  ---------- > 6:  21307f1f2d perf-lib.sh: forbid the use of GIT_TEST_INSTALLED
-- 
2.21.0.593.g511ec345e18


  parent reply	other threads:[~2019-05-07 10:55 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-25 10:15 What's cooking in git.git (Apr 2019, #05; Thu, 25) Junio C Hamano
2019-04-25 14:50 ` Elijah Newren
2019-04-25 22:16 ` js/partial-clone-connectivity-check (was: What's cooking in git.git (Apr 2019, #05; Thu, 25)) Josh Steadmon
2019-05-02  2:52   ` Jeff King
2019-05-02 16:48     ` Josh Steadmon
2019-05-02 21:45     ` Jeff King
2019-05-02 22:24       ` Jeff King
2019-05-06 19:16         ` [PATCH] perf-lib.sh: make "./run <revisions>" use the correct gits Ævar Arnfjörð Bjarmason
2019-05-06 20:24           ` Jeff King
2019-05-06 23:23             ` [PATCH v2 0/2] perf-lib.sh: fix 0baf78e7bc regression, refactor & fix bugs Ævar Arnfjörð Bjarmason
2019-05-07  7:06               ` Jeff King
2019-05-07 10:54               ` Ævar Arnfjörð Bjarmason [this message]
2019-05-07 21:36                 ` [PATCH v3 0/6] " Jeff King
2019-05-08  1:59                   ` Junio C Hamano
2019-05-07 10:54               ` [PATCH v3 1/6] perf README: correct docs for 3c8f12c96c regression Ævar Arnfjörð Bjarmason
2019-05-07 10:54               ` [PATCH v3 2/6] perf aggregate: remove GIT_TEST_INSTALLED from --codespeed Ævar Arnfjörð Bjarmason
2019-05-07 10:54               ` [PATCH v3 3/6] perf-lib.sh: make "./run <revisions>" use the correct gits Ævar Arnfjörð Bjarmason
2019-05-07 10:54               ` [PATCH v3 4/6] perf-lib.sh: remove GIT_TEST_INSTALLED from perf-lib.sh Ævar Arnfjörð Bjarmason
2019-05-07 10:54               ` [PATCH v3 5/6] perf tests: add "bindir" prefix to git tree test results Ævar Arnfjörð Bjarmason
2019-05-07 10:54               ` [PATCH v3 6/6] perf-lib.sh: forbid the use of GIT_TEST_INSTALLED Ævar Arnfjörð Bjarmason
2019-05-06 23:23             ` [PATCH v2 1/2] perf-lib.sh: make "./run <revisions>" use the correct gits Ævar Arnfjörð Bjarmason
2019-05-07  7:19               ` Jeff King
2019-05-06 23:23             ` [PATCH v2 2/2] perf-lib.sh: remove GIT_TEST_INSTALLED from perf-lib.sh Ævar Arnfjörð Bjarmason
2019-05-07  7:16               ` Jeff King
2019-05-07  8:31                 ` Ævar Arnfjörð Bjarmason
2019-05-07 21:23                   ` Jeff King
2019-04-26  5:05 ` What's cooking in git.git (Apr 2019, #05; Thu, 25) Taylor Blau
2019-04-26  5:41   ` Junio C Hamano
2019-04-26  5:53     ` Taylor Blau
2019-04-26  6:01       ` Junio C Hamano
2019-04-26 17:58     ` Kaartic Sivaraam
2019-04-27  5:06       ` Junio C Hamano
2019-04-27  5:57         ` Kaartic Sivaraam
2019-05-02  3:09         ` Jeff King
2019-04-29 22:20 ` js/macos-gettext-build, was " Johannes Schindelin
2019-05-05  5:13   ` Junio C Hamano
2019-05-06  9:11 ` Duy Nguyen
2019-05-07  2:36   ` Junio C Hamano

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=20190507105434.9600-1-avarab@gmail.com \
    --to=avarab@gmail.com \
    --cc=christian.couder@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    /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).