Mercurial > hg
changeset 49460:3c026138f234
compare-disco: display a header by default
This help us to understand the output.
(the code is hacky, but this is a quicky and dirty debug script)
author | Pierre-Yves DAVID <pierre-yves.david@octobus.net> |
---|---|
date | Sat, 04 Jun 2022 18:58:07 +0200 |
parents | df1d4e442c08 |
children | ebbaf6a77807 |
files | contrib/perf-utils/compare-discovery-case |
diffstat | 1 files changed, 26 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf-utils/compare-discovery-case Sat Jun 04 18:57:19 2022 +0200 +++ b/contrib/perf-utils/compare-discovery-case Sat Jun 04 18:58:07 2022 +0200 @@ -113,8 +113,29 @@ assert False -def compare(repo, local_case, remote_case): +def compare( + repo, + local_case, + remote_case, + display_header=True, +): case = (repo, local_case, remote_case) + if display_header: + print( + "#", + "repo", + "local-subset", + "remote-subset", + "discovery-variant", + "roundtrips", + "queries", + "revs", + "local-heads", + "common-heads", + "undecided-initial", + "undecided-common", + "undecided-missing", + ) for variant in VARIANTS_KEYS: res = process(case, VARIANTS[variant]) revs = res["nb-revs"] @@ -175,6 +196,10 @@ argv = sys.argv[:] kwargs = {} + # primitive arg parsing + if '--no-header' in argv: + kwargs['display_header'] = False + argv = [a for a in argv if a != '--no-header'] if len(argv) != 4: usage = f'USAGE: {script_name} REPO LOCAL_CASE REMOTE_CASE'