Mercurial > hg
changeset 18062:1471f5e83686
perf: add a command to measure revset performance
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Thu, 06 Dec 2012 11:21:11 -0800 |
parents | 0e4316c3a703 |
children | 34a1a639d835 |
files | contrib/perf.py |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Wed Dec 12 15:17:18 2012 -0800 +++ b/contrib/perf.py Thu Dec 06 11:21:11 2012 -0800 @@ -228,6 +228,11 @@ timer(d) +def perfrevset(ui, repo, expr): + def d(): + repo.revs(expr) + timer(d) + cmdtable = { 'perfcca': (perfcca, []), 'perffncacheload': (perffncacheload, []), @@ -258,4 +263,5 @@ 'perfrevlog': (perfrevlog, [('d', 'dist', 100, 'distance between the revisions')], "[INDEXFILE]"), + 'perfrevset': (perfrevset, [], "REVSET") }