# HG changeset patch # User Pierre-Yves David # Date 2014-11-21 00:27:55 # Node ID ccb93e9affc1a05187410700dd2f7e9e100716d4 # Parent cf3495dfd7ed5d1a6f94ff8589d95bb2efd64bb5 perf: add a perfloadmarkers command It is used to benchmark the obsstore initialization time. diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -525,3 +525,12 @@ def perfbranchmap(ui, repo, full=False): 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()