Mercurial > hg-stable
changeset 18239:a95f1d619bb7
perftest: add an option to invalidate volatile cache
Some revsets are sensitive to such initialization. Being able to
test the impact is great.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 04 Jan 2013 19:22:40 +0100 |
parents | 1f991e625d01 |
children | a8318715d8bb |
files | contrib/perf.py |
diffstat | 1 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Fri Jan 04 19:22:15 2013 +0100 +++ b/contrib/perf.py Fri Jan 04 19:22:40 2013 +0100 @@ -261,10 +261,17 @@ timer(d) -@command('perfrevset',[], +@command('perfrevset', + [('C', 'clear', False, 'clear volatile cache between each call.')], "REVSET") -def perfrevset(ui, repo, expr): - """benchmark the execution time of a revset""" +def perfrevset(ui, repo, expr, clear=False): + """benchmark the execution time of a revset + + Use the --clean option if need to evaluate the impact of build volative + revisions set cache on the revset execution. Volatile cache hold filtered + and obsolete related cache.""" def d(): + if clear: + repo.invalidatevolatilesets() repo.revs(expr) timer(d)