perf: make measuring foldmap perf work again
authorSiddharth Agarwal <sid0@fb.com>
Thu, 02 Apr 2015 19:13:50 -0700
changeset 24607 f5b527024fcc
parent 24606 e4a733c34bc6
child 24608 1c533e23ce95
perf: make measuring foldmap perf work again Rev 25c1d3ca5ff6 split the foldmap into two, but I forgot to update perf for the changes.
contrib/perf.py
--- a/contrib/perf.py	Tue Mar 31 23:22:03 2015 -0700
+++ b/contrib/perf.py	Thu Apr 02 19:13:50 2015 -0700
@@ -189,14 +189,25 @@
     timer(d)
     fm.end()
 
-@command('perfdirstatefoldmap')
-def perffoldmap(ui, repo):
+@command('perffilefoldmap')
+def perffilefoldmap(ui, repo):
     timer, fm = gettimer(ui)
     dirstate = repo.dirstate
     'a' in dirstate
     def d():
-        dirstate._foldmap.get('a')
-        del dirstate._foldmap
+        dirstate._filefoldmap.get('a')
+        del dirstate._filefoldmap
+    timer(d)
+    fm.end()
+
+@command('perfdirfoldmap')
+def perfdirfoldmap(ui, repo):
+    timer, fm = gettimer(ui)
+    dirstate = repo.dirstate
+    'a' in dirstate
+    def d():
+        dirstate._dirfoldmap.get('a')
+        del dirstate._dirfoldmap
         del dirstate._dirs
     timer(d)
     fm.end()