Patchwork [04,of,13] perf: document `perfdirstatedirs`

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 8, 2019, 11:47 a.m.
Message ID <902c06177e20872773fb.1570535271@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/42096/
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 1570513655 14400
#      Tue Oct 08 01:47:35 2019 -0400
# Node ID 902c06177e20872773fb8bab6ca3569412143b08
# Parent  574a82b6c9e77c1ffd3e69d0649b720945b182c6
# EXP-Topic perf-doc
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 902c06177e20
perf: document `perfdirstatedirs`

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1124,6 +1124,8 @@  def perfdirstate(ui, repo, **opts):
 
 @command(b'perfdirstatedirs', formatteropts)
 def perfdirstatedirs(ui, repo, **opts):
+    """benchmap a 'dirstate.hasdir' call from an empty `dirs` cache
+    """
     opts = _byteskwargs(opts)
     timer, fm = gettimer(ui, opts)
     b"a" in 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
@@ -109,7 +109,7 @@  perfstatus
    perfdirs      (no help text available)
    perfdirstate  benchmap the time necessary to load a dirstate from scratch
    perfdirstatedirs
-                 (no help text available)
+                 benchmap a 'dirstate.hasdir' call from an empty 'dirs' cache
    perfdirstatefoldmap
                  (no help text available)
    perfdirstatewrite