comparison contrib/perf.py @ 24607:f5b527024fcc

perf: make measuring foldmap perf work again Rev 25c1d3ca5ff6 split the foldmap into two, but I forgot to update perf for the changes.
author Siddharth Agarwal <sid0@fb.com>
date Thu, 02 Apr 2015 19:13:50 -0700
parents 389693a245fa
children e8eb3ecdaa0c
comparison
equal deleted inserted replaced
24606:e4a733c34bc6 24607:f5b527024fcc
187 "a" in repo.dirstate._dirs 187 "a" in repo.dirstate._dirs
188 del repo.dirstate._dirs 188 del repo.dirstate._dirs
189 timer(d) 189 timer(d)
190 fm.end() 190 fm.end()
191 191
192 @command('perfdirstatefoldmap') 192 @command('perffilefoldmap')
193 def perffoldmap(ui, repo): 193 def perffilefoldmap(ui, repo):
194 timer, fm = gettimer(ui) 194 timer, fm = gettimer(ui)
195 dirstate = repo.dirstate 195 dirstate = repo.dirstate
196 'a' in dirstate 196 'a' in dirstate
197 def d(): 197 def d():
198 dirstate._foldmap.get('a') 198 dirstate._filefoldmap.get('a')
199 del dirstate._foldmap 199 del dirstate._filefoldmap
200 timer(d)
201 fm.end()
202
203 @command('perfdirfoldmap')
204 def perfdirfoldmap(ui, repo):
205 timer, fm = gettimer(ui)
206 dirstate = repo.dirstate
207 'a' in dirstate
208 def d():
209 dirstate._dirfoldmap.get('a')
210 del dirstate._dirfoldmap
200 del dirstate._dirs 211 del dirstate._dirs
201 timer(d) 212 timer(d)
202 fm.end() 213 fm.end()
203 214
204 @command('perfdirstatewrite') 215 @command('perfdirstatewrite')