Mercurial > hg-stable
changeset 23485:ccb93e9affc1
perf: add a perfloadmarkers command
It is used to benchmark the obsstore initialization time.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 20 Nov 2014 16:27:55 -0800 |
parents | cf3495dfd7ed |
children | 1de214837f5e |
files | contrib/perf.py |
diffstat | 1 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Wed Nov 19 03:38:51 2014 +0100 +++ b/contrib/perf.py Thu Nov 20 16:27:55 2014 -0800 @@ -525,3 +525,12 @@ branchmap.read = oldread branchmap.branchcache.write = oldwrite fm.end() + +@command('perfloadmarkers') +def perfloadmarkers(ui, repo): + """benchmark the time to parse the on-disk markers for a repo + + Result is the number of markers in the repo.""" + timer, fm = gettimer(ui) + timer(lambda: len(obsolete.obsstore(repo.sopener))) + fm.end()