comparison contrib/perf.py @ 20846:b581c5827516

perf: unroll the result in perfrevset With the new lazy revset implementation, we need to actually read all elements to trigger all the computations. Otherwise a no-op if of course much faster than the full work.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 26 Mar 2014 17:25:11 -0700
parents d67a7758da6d
children d8ff1f671aed
comparison
equal deleted inserted replaced
20845:bc95143446e8 20846:b581c5827516
333 revisions set cache on the revset execution. Volatile cache hold filtered 333 revisions set cache on the revset execution. Volatile cache hold filtered
334 and obsolete related cache.""" 334 and obsolete related cache."""
335 def d(): 335 def d():
336 if clear: 336 if clear:
337 repo.invalidatevolatilesets() 337 repo.invalidatevolatilesets()
338 repo.revs(expr) 338 for r in repo.revs(expr): pass
339 timer(d) 339 timer(d)
340 340
341 @command('perfvolatilesets') 341 @command('perfvolatilesets')
342 def perfvolatilesets(ui, repo, *names): 342 def perfvolatilesets(ui, repo, *names):
343 """benchmark the computation of various volatile set 343 """benchmark the computation of various volatile set