changeset 42015:dbca2e5563c3

perf: document config options We have configuration, so we better document it.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 25 Mar 2019 13:43:40 +0100
parents d93436e2ca6b
children b900b392c1cc
files contrib/perf.py tests/test-contrib-perf.t
diffstat 2 files changed, 37 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Mon Mar 25 13:16:53 2019 +0100
+++ b/contrib/perf.py	Mon Mar 25 13:43:40 2019 +0100
@@ -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:
 #
--- a/tests/test-contrib-perf.t	Mon Mar 25 13:16:53 2019 +0100
+++ b/tests/test-contrib-perf.t	Mon Mar 25 13:43:40 2019 +0100
@@ -41,6 +41,24 @@
   $ 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