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)
--- 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'