changeset 16260:33fcad3cfbbc

perf: tweak tests for testing index performance improvements
author Matt Mackall <mpm@selenic.com>
date Thu, 15 Mar 2012 13:11:03 -0500
parents 589aab2ca716
children 7b9bf72430ba
files contrib/perf.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Wed Mar 14 01:13:45 2012 +0100
+++ b/contrib/perf.py	Thu Mar 15 13:11:03 2012 -0500
@@ -46,7 +46,7 @@
     timer(lambda: sum(map(len, repo.status())))
 
 def perfheads(ui, repo):
-    timer(lambda: len(repo.changelog.heads()))
+    timer(lambda: len(repo.changelog.headrevs()))
 
 def perftags(ui, repo):
     import mercurial.changelog, mercurial.manifest
@@ -84,8 +84,8 @@
     mercurial.revlog._prereadsize = 2**24 # disable lazy parser in old hg
     n = repo["tip"].node()
     def d():
-        repo.invalidate()
-        repo[n]
+        cl = mercurial.revlog.revlog(repo.sopener, "00changelog.i")
+        cl.rev(n)
     timer(d)
 
 def perfstartup(ui, repo):