contrib/perf.py
changeset 32733 2b0a8b0f3435
parent 32732 e36569bd9e28
child 32888 04fa5520d167
--- a/contrib/perf.py	Tue May 23 02:27:41 2017 +0200
+++ b/contrib/perf.py	Wed Jun 07 18:22:11 2017 +0100
@@ -467,6 +467,16 @@
     timer(d)
     fm.end()
 
+@command('perfbookmarks', formatteropts)
+def perfbookmarks(ui, repo, **opts):
+    """benchmark parsing bookmarks from disk to memory"""
+    timer, fm = gettimer(ui, opts)
+    def d():
+        clearfilecache(repo, '_bookmarks')
+        repo._bookmarks
+    timer(d)
+    fm.end()
+
 @command('perfchangegroupchangelog', formatteropts +
          [('', 'version', '02', 'changegroup version'),
           ('r', 'rev', '', 'revisions to add to changegroup')])