comparison contrib/perf.py @ 17553:5ab863922e0f

perf: add perffncacheencode Examples (all done with somewhat dated clones I found on my disk): Netbeans (~120k entries in fncache): $ hg perffncacheencode ! wall 4.338000 comb 4.336828 user 4.336828 sys 0.000000 (best of 3) Openoffice (~77k entries in fncache)): $ hg perffncacheencode ! wall 1.533000 comb 1.528810 user 1.528810 sys 0.000000 (best of 7) Xen (~10k entries in fncache): $ hg perffncacheencode ! wall 0.198000 comb 0.187201 user 0.187201 sys 0.000000 (best of 51) Done on Windows 7 x64.
author Adrian Buehlmann <adrian@cadifra.com>
date Fri, 14 Sep 2012 13:02:31 +0200
parents 01c1ee4bd1dd
children 769f66861eb8
comparison
equal deleted inserted replaced
17552:453d790fe089 17553:5ab863922e0f
193 def d(): 193 def d():
194 s.fncache._dirty = True 194 s.fncache._dirty = True
195 s.fncache.write() 195 s.fncache.write()
196 timer(d) 196 timer(d)
197 197
198 def perffncacheencode(ui, repo):
199 from mercurial import store
200 s = store.store(set(['store','fncache','dotencode']),
201 repo.path, scmutil.opener)
202 s.fncache._load()
203 def d():
204 for p in s.fncache.entries:
205 s.encode(p)
206 timer(d)
207
198 def perfdiffwd(ui, repo): 208 def perfdiffwd(ui, repo):
199 """Profile diff of working directory changes""" 209 """Profile diff of working directory changes"""
200 options = { 210 options = {
201 'w': 'ignore_all_space', 211 'w': 'ignore_all_space',
202 'b': 'ignore_space_change', 212 'b': 'ignore_space_change',
224 234
225 cmdtable = { 235 cmdtable = {
226 'perfcca': (perfcca, []), 236 'perfcca': (perfcca, []),
227 'perffncacheload': (perffncacheload, []), 237 'perffncacheload': (perffncacheload, []),
228 'perffncachewrite': (perffncachewrite, []), 238 'perffncachewrite': (perffncachewrite, []),
239 'perffncacheencode': (perffncacheencode, []),
229 'perflookup': (perflookup, []), 240 'perflookup': (perflookup, []),
230 'perfrevrange': (perfrevrange, []), 241 'perfrevrange': (perfrevrange, []),
231 'perfnodelookup': (perfnodelookup, []), 242 'perfnodelookup': (perfnodelookup, []),
232 'perfparents': (perfparents, []), 243 'perfparents': (perfparents, []),
233 'perfstartup': (perfstartup, []), 244 'perfstartup': (perfstartup, []),