contrib/perf.py
changeset 16858 fdf99e0f60f3
parent 16802 7e5d94381cd1
child 16866 91f3ac205816
--- a/contrib/perf.py	Mon Jun 04 21:40:38 2012 +0200
+++ b/contrib/perf.py	Fri Jun 01 15:50:22 2012 -0700
@@ -140,6 +140,10 @@
 def perflookup(ui, repo, rev):
     timer(lambda: len(repo.lookup(rev)))
 
+def perfrevrange(ui, repo, *specs):
+    revrange = scmutil.revrange
+    timer(lambda: len(revrange(repo, specs)))
+
 def perfnodelookup(ui, repo, rev):
     import mercurial.revlog
     mercurial.revlog._prereadsize = 2**24 # disable lazy parser in old hg
@@ -223,6 +227,7 @@
     'perffncacheload': (perffncacheload, []),
     'perffncachewrite': (perffncachewrite, []),
     'perflookup': (perflookup, []),
+    'perfrevrange': (perfrevrange, []),
     'perfnodelookup': (perfnodelookup, []),
     'perfparents': (perfparents, []),
     'perfstartup': (perfstartup, []),