comparison tests/test-setdiscovery.t @ 23813:932f814bf016

setdiscovery: always add exponential sample to the heads As explained in a previous changeset, prioritizing heads too much behaves pathologically when there are more heads than the sample size. To counter this, we always inject exponential samples before reducing to the sample size limit. This already show some benefit in the test themselves, but on a real-world example this moves my discovery for push to pathologically headed repo from 45 rounds to 17 of them. We should maybe ensure that at least 25% of the result sample is heads, but I think the random sampling will be fine in practice.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 07 Jan 2015 17:28:51 -0800
parents db58186dd8e3
children 8de8cd34f2e3
comparison
equal deleted inserted replaced
23812:db58186dd8e3 23813:932f814bf016
315 sampling from both directions 315 sampling from both directions
316 searching: 3 queries 316 searching: 3 queries
317 query 3; still undecided: 1140, sample size is: 200 317 query 3; still undecided: 1140, sample size is: 200
318 sampling from both directions 318 sampling from both directions
319 searching: 4 queries 319 searching: 4 queries
320 query 4; still undecided: 940, sample size is: 200 320 query 4; still undecided: 592, sample size is: 200
321 sampling from both directions 321 sampling from both directions
322 searching: 5 queries 322 searching: 5 queries
323 query 5; still undecided: 740, sample size is: 200 323 query 5; still undecided: 292, sample size is: 200
324 sampling from both directions 324 sampling from both directions
325 searching: 6 queries 325 searching: 6 queries
326 query 6; still undecided: 540, sample size is: 200 326 query 6; still undecided: 51, sample size is: 51
327 sampling from both directions 327 6 total queries
328 searching: 7 queries
329 query 7; still undecided: 46, sample size is: 46
330 7 total queries
331 common heads: 3ee37d65064a 328 common heads: 3ee37d65064a
332 329
333 Test actual protocol when pulling one new head in addition to common heads 330 Test actual protocol when pulling one new head in addition to common heads
334 331
335 $ hg clone -U b c 332 $ hg clone -U b c