##// END OF EJS Templates
perf: add a perfancestors benchmark
Bryan O'Sullivan -
r16802:7e5d9438 default
parent child Browse files
Show More
@@ -71,6 +71,13 b' def perftags(ui, repo):'
71 return len(repo.tags())
71 return len(repo.tags())
72 timer(t)
72 timer(t)
73
73
74 def perfancestors(ui, repo):
75 heads = repo.changelog.headrevs()
76 def d():
77 for a in repo.changelog.ancestors(*heads):
78 pass
79 timer(d)
80
74 def perfdirstate(ui, repo):
81 def perfdirstate(ui, repo):
75 "a" in repo.dirstate
82 "a" in repo.dirstate
76 def d():
83 def d():
@@ -226,6 +233,7 b' cmdtable = {'
226 'perfindex': (perfindex, []),
233 'perfindex': (perfindex, []),
227 'perfheads': (perfheads, []),
234 'perfheads': (perfheads, []),
228 'perftags': (perftags, []),
235 'perftags': (perftags, []),
236 'perfancestors': (perfancestors, []),
229 'perfdirstate': (perfdirstate, []),
237 'perfdirstate': (perfdirstate, []),
230 'perfdirstatedirs': (perfdirstate, []),
238 'perfdirstatedirs': (perfdirstate, []),
231 'perfdirstatewrite': (perfdirstatewrite, []),
239 'perfdirstatewrite': (perfdirstatewrite, []),
General Comments 0
You need to be logged in to leave comments. Login now