--- a/contrib/perf.py Wed May 30 14:31:51 2012 -0500
+++ b/contrib/perf.py Tue May 15 10:44:17 2012 -0700
@@ -71,6 +71,13 @@
return len(repo.tags())
timer(t)
+def perfancestors(ui, repo):
+ heads = repo.changelog.headrevs()
+ def d():
+ for a in repo.changelog.ancestors(*heads):
+ pass
+ timer(d)
+
def perfdirstate(ui, repo):
"a" in repo.dirstate
def d():
@@ -226,6 +233,7 @@
'perfindex': (perfindex, []),
'perfheads': (perfheads, []),
'perftags': (perftags, []),
+ 'perfancestors': (perfancestors, []),
'perfdirstate': (perfdirstate, []),
'perfdirstatedirs': (perfdirstate, []),
'perfdirstatewrite': (perfdirstatewrite, []),