Mercurial > hg
changeset 16403:efae1fea4bbd
perf: time fncache read and write performance
author | Bryan O'Sullivan <bryano@fb.com> |
---|---|
date | Thu, 12 Apr 2012 15:21:52 -0700 |
parents | 1fb2f1400ea8 |
children | 9fca5b056c0a |
files | contrib/perf.py |
diffstat | 1 files changed, 18 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Sun Apr 01 14:12:14 2012 +0200 +++ b/contrib/perf.py Thu Apr 12 15:21:52 2012 -0700 @@ -136,6 +136,22 @@ def perfcca(ui, repo): timer(lambda: scmutil.casecollisionauditor(ui, False, repo[None])) +def perffncacheload(ui, repo): + from mercurial import scmutil, store + s = store.store(set(['store','fncache']), repo.path, scmutil.opener) + def d(): + s.fncache._load() + timer(d) + +def perffncachewrite(ui, repo): + from mercurial import scmutil, store + s = store.store(set(['store','fncache']), repo.path, scmutil.opener) + s.fncache._load() + def d(): + s.fncache._dirty = True + s.fncache.write() + timer(d) + def perfdiffwd(ui, repo): """Profile diff of working directory changes""" options = { @@ -165,6 +181,8 @@ cmdtable = { 'perfcca': (perfcca, []), + 'perffncacheload': (perffncacheload, []), + 'perffncachewrite': (perffncachewrite, []), 'perflookup': (perflookup, []), 'perfnodelookup': (perfnodelookup, []), 'perfparents': (perfparents, []),