contrib/perf.py
changeset 16262 bf7a6c3b2a4a
parent 16260 33fcad3cfbbc
child 16266 77d56a5e74a5
--- a/contrib/perf.py	Thu Mar 15 13:11:42 2012 -0500
+++ b/contrib/perf.py	Thu Mar 15 15:58:55 2012 -0500
@@ -79,6 +79,13 @@
         repo.manifest._cache = None
     timer(d)
 
+def perfchangeset(ui, repo, rev):
+    n = repo[rev].node()
+    def d():
+        c = repo.changelog.read(n)
+        repo.changelog._cache = None
+    timer(d)
+
 def perfindex(ui, repo):
     import mercurial.revlog
     mercurial.revlog._prereadsize = 2**24 # disable lazy parser in old hg
@@ -151,6 +158,7 @@
     'perfstatus': (perfstatus, []),
     'perfwalk': (perfwalk, []),
     'perfmanifest': (perfmanifest, []),
+    'perfchangeset': (perfchangeset, []),
     'perfindex': (perfindex, []),
     'perfheads': (perfheads, []),
     'perftags': (perftags, []),