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

login
register
mail settings
Submitter Siddharth Agarwal
Date April 3, 2015, 4:02 a.m.
Message ID <10d7d813c0de99238594.1428033736@devbig136.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8470/
State Accepted
Commit f5b527024fcc90b72b3467e5c59d74ab8b1c30e7
Headers show

Comments

Siddharth Agarwal - April 3, 2015, 4:02 a.m.
# HG changeset patch
# User Siddharth Agarwal <sid0@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.

Patch

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()
 
-@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()