Mercurial > hg
changeset 16858:fdf99e0f60f3
perf: add a benchmark for revrange
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Fri, 01 Jun 2012 15:50:22 -0700 |
parents | 1415edd88c56 |
children | eeb464ed7275 |
files | contrib/perf.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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, []),