Patchwork [2,of,6,"] perf: document config options

login
register
mail settings
Submitter Pierre-Yves David
Date March 25, 2019, 1:19 p.m.
Message ID <9ba4809996b5ce769376.1553519961@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/39379/
State Accepted
Headers show

Comments

Pierre-Yves David - March 25, 2019, 1:19 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1553517820 -3600
#      Mon Mar 25 13:43:40 2019 +0100
# Node ID 9ba4809996b5ce769376a86cf88ef8f2b844b806
# Parent  2af270b21d11836dbfc3b693c152616f5493cab3
# EXP-Topic perf-run
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 9ba4809996b5
perf: document config options

We have configuration, so we better document it.

Patch

diff --git a/contrib/perf.py b/contrib/perf.py
--- a/contrib/perf.py
+++ b/contrib/perf.py
@@ -1,5 +1,23 @@ 
 # perf.py - performance test routines
-'''helper extension to measure performance'''
+'''helper extension to measure performance
+
+Configurations
+==============
+
+``perf``
+--------
+
+``all-timing``
+    When set, additional statistic will be reported for each benchmark: best,
+    worst, median average. If not set only the best timing is reported
+    (default: off).
+
+``presleep``
+  number of second to wait before any group of run (default: 1)
+
+``stub``
+    When set, benchmark will only be run once, useful for testing (default: off)
+'''
 
 # "historical portability" policy of perf.py:
 #
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
@@ -41,6 +41,24 @@  perfstatus
   $ hg help -e perf
   perf extension - helper extension to measure performance
   
+  Configurations
+  ==============
+  
+  "perf"
+  ------
+  
+  "all-timing"
+      When set, additional statistic will be reported for each benchmark: best,
+      worst, median average. If not set only the best timing is reported
+      (default: off).
+  
+  "presleep"
+    number of second to wait before any group of run (default: 1)
+  
+  "stub"
+      When set, benchmark will only be run once, useful for testing (default:
+      off)
+  
   list of commands:
   
    perfaddremove