Patchwork [01,of,13] perf: document `perfstatus`

login
register
mail settings
Submitter Pierre-Yves David
Date Oct. 8, 2019, 11:47 a.m.
Message ID <8d066f6d8a5716e88812.1570535268@nodosa.octobus.net>
Download mbox | patch
Permalink /patch/42095/
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 1570511728 14400
#      Tue Oct 08 01:15:28 2019 -0400
# Node ID 8d066f6d8a5716e88812487d7d1c7db2808bb9bb
# Parent  9002f4a3dde63518d1467f3934a1fe226f3b2297
# EXP-Topic perf-doc
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 8d066f6d8a57
perf: document `perfstatus`
Pulkit Goyal - Oct. 9, 2019, 2:24 p.m.
On Tue, Oct 8, 2019 at 8:16 PM Pierre-Yves David
<pierre-yves.david@ens-lyon.org> wrote:
>
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1570511728 14400
> #      Tue Oct 08 01:15:28 2019 -0400
> # Node ID 8d066f6d8a5716e88812487d7d1c7db2808bb9bb
> # Parent  9002f4a3dde63518d1467f3934a1fe226f3b2297
> # EXP-Topic perf-doc
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 8d066f6d8a57
> perf: document `perfstatus`

Queued 1-11, many thanks!

For 12, 13 I personally will like to unify/organize these
perfdirstate* commands much better and use flags there. I am not sure
that should be a blocker and hence I will leave it for others to have
a look.

(If we had subcommands, these might be more better organized)

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -764,6 +764,13 @@  def perfannotate(ui, repo, f, **opts):
     + formatteropts,
 )
 def perfstatus(ui, repo, **opts):
+    """benchmark the performance of a single status call
+
+    The repository data are preserved between each call.
+
+    By default, only the status of the tracked file are requested. If
+    `--unknown` is passed, the "unknown" files are also tracked.
+    """
     opts = _byteskwargs(opts)
     # m = match.always(repo.root, repo.getcwd())
     # timer(lambda: sum(map(len, repo.dirstate.status(m, [], False, False,
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
@@ -172,7 +172,7 @@  perfstatus
    perfrevrange  (no help text available)
    perfrevset    benchmark the execution time of a revset
    perfstartup   (no help text available)
-   perfstatus    (no help text available)
+   perfstatus    benchmark the performance of a single status call
    perftags      (no help text available)
    perftemplating
                  test the rendering time of a given template