##// END OF EJS Templates
perf: add command to test performance of membership in ancestor set...
Siddharth Agarwal -
r18080:486bfb20 default
parent child Browse files
Show More
@@ -78,6 +78,15 b' def perfancestors(ui, repo):'
78 78 pass
79 79 timer(d)
80 80
81 def perfancestorset(ui, repo, revset):
82 revs = repo.revs(revset)
83 heads = repo.changelog.headrevs()
84 def d():
85 s = set(repo.changelog.ancestors(heads))
86 for rev in revs:
87 rev in s
88 timer(d)
89
81 90 def perfdirstate(ui, repo):
82 91 "a" in repo.dirstate
83 92 def d():
@@ -253,6 +262,7 b' cmdtable = {'
253 262 'perfheads': (perfheads, []),
254 263 'perftags': (perftags, []),
255 264 'perfancestors': (perfancestors, []),
265 'perfancestorset': (perfancestorset, [], "REVSET"),
256 266 'perfdirstate': (perfdirstate, []),
257 267 'perfdirstatedirs': (perfdirstate, []),
258 268 'perfdirstatewrite': (perfdirstatewrite, []),
General Comments 0
You need to be logged in to leave comments. Login now