##// END OF EJS Templates
setdiscovery: limit the size of all sample (issue4411)...
Pierre-Yves David -
r23130:ced63239 3.2 stable
parent child Browse files
Show More
@@ -203,15 +203,19 b' def findcommonheads(ui, local, remote,'
203 if full:
203 if full:
204 ui.note(_("sampling from both directions\n"))
204 ui.note(_("sampling from both directions\n"))
205 sample = _takefullsample(dag, undecided, size=fullsamplesize)
205 sample = _takefullsample(dag, undecided, size=fullsamplesize)
206 targetsize = fullsamplesize
206 elif common:
207 elif common:
207 # use cheapish initial sample
208 # use cheapish initial sample
208 ui.debug("taking initial sample\n")
209 ui.debug("taking initial sample\n")
209 sample = _takefullsample(dag, undecided, size=fullsamplesize)
210 sample = _takefullsample(dag, undecided, size=fullsamplesize)
211 targetsize = fullsamplesize
210 else:
212 else:
211 # use even cheaper initial sample
213 # use even cheaper initial sample
212 ui.debug("taking quick initial sample\n")
214 ui.debug("taking quick initial sample\n")
213 sample = _takequicksample(dag, undecided, size=initialsamplesize,
215 sample = _takequicksample(dag, undecided, size=initialsamplesize,
214 initial=True)
216 initial=True)
217 targetsize = initialsamplesize
218 sample = _limitsample(sample, targetsize)
215
219
216 roundtrips += 1
220 roundtrips += 1
217 ui.progress(_('searching'), roundtrips, unit=_('queries'))
221 ui.progress(_('searching'), roundtrips, unit=_('queries'))
@@ -311,17 +311,23 b' One with >200 heads, which used to use u'
311 searching for changes
311 searching for changes
312 taking quick initial sample
312 taking quick initial sample
313 searching: 2 queries
313 searching: 2 queries
314 query 2; still undecided: 1240, sample size is: 260
314 query 2; still undecided: 1240, sample size is: 100
315 sampling from both directions
315 sampling from both directions
316 searching: 3 queries
316 searching: 3 queries
317 query 3; still undecided: 980, sample size is: 260
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: 720, sample size is: 260
320 query 4; still undecided: 940, 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: 460, sample size is: 200
323 query 5; still undecided: 740, sample size is: 200
324 5 total queries
324 sampling from both directions
325 searching: 6 queries
326 query 6; still undecided: 540, sample size is: 200
327 sampling from both directions
328 searching: 7 queries
329 query 7; still undecided: 44, sample size is: 44
330 7 total queries
325 common heads: 3ee37d65064a
331 common heads: 3ee37d65064a
326
332
327 Test actual protocol when pulling one new head in addition to common heads
333 Test actual protocol when pulling one new head in addition to common heads
General Comments 0
You need to be logged in to leave comments. Login now