Show More
@@ -140,6 +140,10 b' def perfparents(ui, repo):' | |||||
140 | def perflookup(ui, repo, rev): |
|
140 | def perflookup(ui, repo, rev): | |
141 | timer(lambda: len(repo.lookup(rev))) |
|
141 | timer(lambda: len(repo.lookup(rev))) | |
142 |
|
142 | |||
|
143 | def perfrevrange(ui, repo, *specs): | |||
|
144 | revrange = scmutil.revrange | |||
|
145 | timer(lambda: len(revrange(repo, specs))) | |||
|
146 | ||||
143 | def perfnodelookup(ui, repo, rev): |
|
147 | def perfnodelookup(ui, repo, rev): | |
144 | import mercurial.revlog |
|
148 | import mercurial.revlog | |
145 | mercurial.revlog._prereadsize = 2**24 # disable lazy parser in old hg |
|
149 | mercurial.revlog._prereadsize = 2**24 # disable lazy parser in old hg | |
@@ -223,6 +227,7 b' cmdtable = {' | |||||
223 | 'perffncacheload': (perffncacheload, []), |
|
227 | 'perffncacheload': (perffncacheload, []), | |
224 | 'perffncachewrite': (perffncachewrite, []), |
|
228 | 'perffncachewrite': (perffncachewrite, []), | |
225 | 'perflookup': (perflookup, []), |
|
229 | 'perflookup': (perflookup, []), | |
|
230 | 'perfrevrange': (perfrevrange, []), | |||
226 | 'perfnodelookup': (perfnodelookup, []), |
|
231 | 'perfnodelookup': (perfnodelookup, []), | |
227 | 'perfparents': (perfparents, []), |
|
232 | 'perfparents': (perfparents, []), | |
228 | 'perfstartup': (perfstartup, []), |
|
233 | 'perfstartup': (perfstartup, []), |
General Comments 0
You need to be logged in to leave comments.
Login now