Patchwork [3,of,3,"] discovery-helper: reflect argument value in the name of the results

login
register
mail settings
Submitter Pierre-Yves David
Date March 7, 2019, 11:26 p.m.
Message ID <839479ffefba0c91c06f.1552001201@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/39129/
State Accepted
Headers show

Comments

Pierre-Yves David - March 7, 2019, 11:26 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1551999644 -3600
#      Fri Mar 08 00:00:44 2019 +0100
# Node ID 839479ffefba0c91c06faa8d379b347d0d2a10c2
# Parent  30752188271ad9943379033ec169ef403df2b6c0
# EXP-Topic perf-utils
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 839479ffefba
discovery-helper: reflect argument value in the name of the results

It is common to create multiple pairs of repositories using different argument
values. Recording the argument value in the results names has two main
advantages:

* It is easy to remember the value used to create a pair,
* It get simpler to create multiple pair at the same time from the same source.

Previously, running: `./discovery-helper.sh pypy 50 10` would create a
`pypy-left` and `pypy-right` repository. Now it will create `pypy-50h-10d-left`
and `pypy-50h-10d-right`.

Patch

diff --git a/contrib/perf-utils/discovery-helper.sh b/contrib/perf-utils/discovery-helper.sh
--- a/contrib/perf-utils/discovery-helper.sh
+++ b/contrib/perf-utils/discovery-helper.sh
@@ -42,8 +42,8 @@  shift
 depth="$1"
 shift
 
-leftrepo="${repo}-left"
-rightrepo="${repo}-right"
+leftrepo="${repo}-${nbheads}h-${depth}d-left"
+rightrepo="${repo}-${nbheads}h-${depth}d-right"
 
 left="first(sort(heads(all()), 'desc'), $nbheads)"
 right="last(sort(heads(all()), 'desc'), $nbheads)"