##// END OF EJS Templates
discovery: add a discovery.grow-sample.rate...
marmoute -
r46926:867304e7 default draft
parent child Browse files
Show More
@@ -707,6 +707,12 b' coreconfigitem('
707 b'discovery.grow-sample',
707 b'discovery.grow-sample',
708 default=True,
708 default=True,
709 )
709 )
710 # discovery.grow-sample.rate control the rate at which the sample grow
711 coreconfigitem(
712 b'devel',
713 b'discovery.grow-sample.rate',
714 default=1.05,
715 )
710 # If discovery.randomize is False, random sampling during discovery are
716 # If discovery.randomize is False, random sampling during discovery are
711 # deterministic. It is meant for integration tests.
717 # deterministic. It is meant for integration tests.
712 coreconfigitem(
718 coreconfigitem(
@@ -290,7 +290,6 b' def findcommonheads('
290 fullsamplesize=200,
290 fullsamplesize=200,
291 abortwhenunrelated=True,
291 abortwhenunrelated=True,
292 ancestorsof=None,
292 ancestorsof=None,
293 samplegrowth=1.05,
294 audit=None,
293 audit=None,
295 ):
294 ):
296 """Return a tuple (common, anyincoming, remoteheads) used to identify
295 """Return a tuple (common, anyincoming, remoteheads) used to identify
@@ -300,6 +299,9 b' def findcommonheads('
300 will be updated with extra data about the discovery, this is useful for
299 will be updated with extra data about the discovery, this is useful for
301 debug.
300 debug.
302 """
301 """
302
303 samplegrowth = float(ui.config(b'devel', b'discovery.grow-sample.rate'))
304
303 start = util.timer()
305 start = util.timer()
304
306
305 roundtrips = 0
307 roundtrips = 0
@@ -1412,6 +1412,48 b' One with >200 heads. We now switch to se'
1412 missing: 1040
1412 missing: 1040
1413 common heads: 3ee37d65064a
1413 common heads: 3ee37d65064a
1414
1414
1415 $ hg -R a debugdiscovery b --debug --config devel.discovery.randomize=false --config devel.discovery.grow-sample.rate=1.01
1416 comparing with b
1417 query 1; heads
1418 searching for changes
1419 taking quick initial sample
1420 query 2; still undecided: 1080, sample size is: 100
1421 sampling from both directions
1422 query 3; still undecided: 980, sample size is: 200
1423 sampling from both directions
1424 query 4; still undecided: 497, sample size is: 202
1425 sampling from both directions
1426 query 5; still undecided: 294, sample size is: 204
1427 sampling from both directions
1428 query 6; still undecided: 90, sample size is: 90
1429 6 total queries in *s (glob)
1430 elapsed time: * seconds (glob)
1431 round-trips: 6
1432 heads summary:
1433 total common heads: 1
1434 also local heads: 0
1435 also remote heads: 0
1436 both: 0
1437 local heads: 260
1438 common: 0
1439 missing: 260
1440 remote heads: 1
1441 common: 0
1442 unknown: 1
1443 local changesets: 1340
1444 common: 300
1445 heads: 1
1446 roots: 1
1447 missing: 1040
1448 heads: 260
1449 roots: 260
1450 first undecided set: 1340
1451 heads: 260
1452 roots: 1
1453 common: 300
1454 missing: 1040
1455 common heads: 3ee37d65064a
1456
1415 Test actual protocol when pulling one new head in addition to common heads
1457 Test actual protocol when pulling one new head in addition to common heads
1416
1458
1417 $ hg clone -U b c
1459 $ hg clone -U b c
General Comments 0
You need to be logged in to leave comments. Login now