[PATCH 3 of 6 foldmap-in-C] perf: make measuring foldmap perf work again

Siddharth Agarwal sid0 at fb.com
Thu Apr 2 23:02:16 CDT 2015


# HG changeset patch
# User Siddharth Agarwal <sid0 at fb.com>
# Date 1428027230 25200
#      Thu Apr 02 19:13:50 2015 -0700
# Node ID 10d7d813c0de992385941c042ef96eac672c3ebb
# Parent  e76c0533d7ef1091fa1ac4252f66bbcda3073780
perf: make measuring foldmap perf work again

Rev 25c1d3ca5ff6 split the foldmap into two, but I forgot to update perf for
the changes.

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -189,14 +189,25 @@ def perfdirstatedirs(ui, repo):
     timer(d)
     fm.end()
 
- at command('perfdirstatefoldmap')
-def perffoldmap(ui, repo):
+ at 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()
+
+ at 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()


More information about the Mercurial-devel mailing list