Patchwork [06,of,13] perf: document `perfdirstatefoldmap`

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 8, 2019, 11:47 a.m.
Message ID <877921fc4a78077e3f45.1570535273@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/42100/
State Accepted
Headers show

Comments

Pierre-Yves David - Oct. 8, 2019, 11:47 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1570513690 14400
#      Tue Oct 08 01:48:10 2019 -0400
# Node ID 877921fc4a78077e3f45d08253464930fbfa5ae0
# Parent  13417ac3f81259be90354e190b1e0ff8d6f86314
# EXP-Topic perf-doc
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 877921fc4a78
perf: document `perfdirstatefoldmap`

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1142,6 +1142,10 @@  def perfdirstatedirs(ui, repo, **opts):
 
 @command(b'perfdirstatefoldmap', formatteropts)
 def perfdirstatefoldmap(ui, repo, **opts):
+    """benchmap a `dirstate._map.filefoldmap.get()` request
+
+    The dirstate filefoldmap cache is dropped between every request.
+    """
     opts = _byteskwargs(opts)
     timer, fm = gettimer(ui, opts)
     dirstate = repo.dirstate
diff --git a/tests/test-contrib-perf.t b/tests/test-contrib-perf.t
--- a/tests/test-contrib-perf.t
+++ b/tests/test-contrib-perf.t
@@ -111,7 +111,7 @@  perfstatus
    perfdirstatedirs
                  benchmap a 'dirstate.hasdir' call from an empty 'dirs' cache
    perfdirstatefoldmap
-                 (no help text available)
+                 benchmap a 'dirstate._map.filefoldmap.get()' request
    perfdirstatewrite
                  (no help text available)
    perfdiscovery