Skip to content
Snippets Groups Projects
Commit 362c0026 authored by Pierre-Yves David's avatar Pierre-Yves David :octopus:
Browse files

debug-discovery: also gather details on tree-discovery queries type

This is useful to understand the algorithm.
parent a1bb2154
No related branches found
No related tags found
2 merge requests!229branching: merge stable into default,!190Various debugdiscovery fix (and improvement)
......@@ -1379,6 +1379,10 @@
fm.plain(b"elapsed time: %(elapsed)f seconds\n" % data)
fm.plain(b"round-trips: %(total-roundtrips)9d\n" % data)
fm.plain(b"queries: %(total-queries)9d\n" % data)
if b'total-queries-branches' in data:
fm.plain(b" queries-branches: %(total-queries-branches)9d\n" % data)
if b'total-queries-between' in data:
fm.plain(b" queries-between: %(total-queries-between)9d\n" % data)
fm.plain(b"heads summary:\n")
fm.plain(b" total common heads: %(nb-common-heads)9d\n" % data)
fm.plain(b" also local heads: %(nb-common-heads-local)9d\n" % data)
......
......@@ -39,6 +39,8 @@
if audit is not None:
audit[b'total-roundtrips'] = 1
audit[b'total-queries'] = 0
audit[b'total-queries-branches'] = 0
audit[b'total-queries-between'] = 0
if repo.changelog.tip() == repo.nullid:
base.add(repo.nullid)
......@@ -71,6 +73,7 @@
with remote.commandexecutor() as e:
if audit is not None:
audit[b'total-queries'] += len(unknown)
audit[b'total-queries-branches'] += len(unknown)
branches = e.callcommand(b'branches', {b'nodes': unknown}).result()
unknown = collections.deque(branches)
......@@ -120,6 +123,7 @@
subset = r[p : p + 10]
if audit is not None:
audit[b'total-queries'] += len(subset)
audit[b'total-queries-branches'] += len(subset)
branches = e.callcommand(
b'branches',
{
......@@ -142,6 +146,7 @@
with remote.commandexecutor() as e:
if audit is not None:
audit[b'total-queries'] += len(search)
audit[b'total-queries-between'] += len(search)
between = e.callcommand(b'between', {b'pairs': search}).result()
for n, l in zip(search, between):
......
......@@ -46,6 +46,8 @@
elapsed time: * seconds (glob)
round-trips: 2
queries: 6
queries-branches: 2
queries-between: 4
heads summary:
total common heads: 2
also local heads: 2
......@@ -144,6 +146,8 @@
elapsed time: * seconds (glob)
round-trips: 1
queries: 0
queries-branches: 0
queries-between: 0
heads summary:
total common heads: 2
also local heads: 1
......@@ -249,6 +253,8 @@
elapsed time: * seconds (glob)
round-trips: 2
queries: 3
queries-branches: 1
queries-between: 2
heads summary:
total common heads: 1
also local heads: 1
......@@ -353,6 +359,8 @@
elapsed time: * seconds (glob)
round-trips: 4
queries: 5
queries-branches: 1
queries-between: 4
heads summary:
total common heads: 1
also local heads: 0
......@@ -463,6 +471,8 @@
elapsed time: * seconds (glob)
round-trips: 4
queries: 5
queries-branches: 1
queries-between: 4
heads summary:
total common heads: 1
also local heads: 1
......@@ -567,6 +577,8 @@
elapsed time: * seconds (glob)
round-trips: 4
queries: 5
queries-branches: 1
queries-between: 4
heads summary:
total common heads: 1
also local heads: 0
......@@ -678,6 +690,8 @@
elapsed time: * seconds (glob)
round-trips: 4
queries: 5
queries-branches: 1
queries-between: 4
heads summary:
total common heads: 1
also local heads: 0
......@@ -782,6 +796,8 @@
elapsed time: * seconds (glob)
round-trips: 4
queries: 5
queries-branches: 1
queries-between: 4
heads summary:
total common heads: 1
also local heads: 0
......@@ -893,6 +909,8 @@
elapsed time: * seconds (glob)
round-trips: 4
queries: 5
queries-branches: 1
queries-between: 4
heads summary:
total common heads: 1
also local heads: 0
......@@ -997,6 +1015,8 @@
elapsed time: * seconds (glob)
round-trips: 3
queries: 4
queries-branches: 1
queries-between: 3
heads summary:
total common heads: 1
also local heads: 0
......@@ -1108,6 +1128,8 @@
elapsed time: * seconds (glob)
round-trips: 4
queries: 5
queries-branches: 1
queries-between: 4
heads summary:
total common heads: 1
also local heads: 0
......@@ -1218,6 +1240,8 @@
elapsed time: * seconds (glob)
round-trips: 3
queries: 4
queries-branches: 1
queries-between: 3
heads summary:
total common heads: 1
also local heads: 0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment