Show More
@@ -78,6 +78,15 b' def perfancestors(ui, repo):' | |||||
78 | pass |
|
78 | pass | |
79 | timer(d) |
|
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 | def perfdirstate(ui, repo): |
|
90 | def perfdirstate(ui, repo): | |
82 | "a" in repo.dirstate |
|
91 | "a" in repo.dirstate | |
83 | def d(): |
|
92 | def d(): | |
@@ -253,6 +262,7 b' cmdtable = {' | |||||
253 | 'perfheads': (perfheads, []), |
|
262 | 'perfheads': (perfheads, []), | |
254 | 'perftags': (perftags, []), |
|
263 | 'perftags': (perftags, []), | |
255 | 'perfancestors': (perfancestors, []), |
|
264 | 'perfancestors': (perfancestors, []), | |
|
265 | 'perfancestorset': (perfancestorset, [], "REVSET"), | |||
256 | 'perfdirstate': (perfdirstate, []), |
|
266 | 'perfdirstate': (perfdirstate, []), | |
257 | 'perfdirstatedirs': (perfdirstate, []), |
|
267 | 'perfdirstatedirs': (perfdirstate, []), | |
258 | 'perfdirstatewrite': (perfdirstatewrite, []), |
|
268 | 'perfdirstatewrite': (perfdirstatewrite, []), |
General Comments 0
You need to be logged in to leave comments.
Login now