Patchwork [02,of,13] perf: document `perfdirstate`

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 8, 2019, 11:47 a.m.
Message ID <ec08340eaebb19b13d95.1570535269@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/42098/
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 1570513617 14400
#      Tue Oct 08 01:46:57 2019 -0400
# Node ID ec08340eaebb19b13d9544616ac232cba7cd4e12
# Parent  8d066f6d8a5716e88812487d7d1c7db2808bb9bb
# EXP-Topic perf-doc
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r ec08340eaebb
perf: document `perfdirstate`

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1103,6 +1103,11 @@  def perfdirs(ui, repo, **opts):
 
 @command(b'perfdirstate', formatteropts)
 def perfdirstate(ui, repo, **opts):
+    """benchmap the time necessary to load a dirstate from scratch
+
+    The dirstate is loaded to the point were a "contains" request can be
+    answered.
+    """
     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
@@ -107,7 +107,7 @@  perfstatus
    perfdirfoldmap
                  (no help text available)
    perfdirs      (no help text available)
-   perfdirstate  (no help text available)
+   perfdirstate  benchmap the time necessary to load a dirstate from scratch
    perfdirstatedirs
                  (no help text available)
    perfdirstatefoldmap