[PATCH 4 of 6] perftest: add an option to invalidate volatile cache
pierre-yves.david at logilab.fr
pierre-yves.david at logilab.fr
Fri Jan 4 12:28:51 CST 2013
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1357323760 -3600
# Node ID 8ff4097ce3bc5930a133fccead9c24dfe3318996
# Parent a5761473ca07eb18e304e804d40804c7799c7a5c
perftest: add an option to invalidate volatile cache
Some revset are sensible to such initialisation. Being able to test the impact
is great.
diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -259,12 +259,19 @@ def perfrevlog(ui, repo, file_, **opts):
for x in xrange(0, len(r), dist):
r.revision(r.node(x))
timer(d)
- at command('perfrevset',[],
+ at 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)
More information about the Mercurial-devel
mailing list