Mercurial > hg
changeset 41437:d65ba1ff4559
perf: add some documentation to perfindex
It seems useful to document how the arguments can affect the benchmark.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 28 Jan 2019 04:47:40 -0500 |
parents | ab6d1f82be32 |
children | e9891c734bf8 |
files | contrib/perf.py tests/test-contrib-perf.t |
diffstat | 2 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/perf.py Fri Jan 25 14:53:19 2019 -0500 +++ b/contrib/perf.py Mon Jan 28 04:47:40 2019 -0500 @@ -1017,6 +1017,14 @@ (b'', b'rev', b'', b'revision to be looked up (default tip)'), ] + formatteropts) def perfindex(ui, repo, **opts): + """benchmark index creation time followed by a lookup + + The default is to look `tip` up. Depending on the index implementation, + the revision looked up can matters. For example, an implementation + scanning the index will have a faster lookup time for `--rev tip` than for + `--rev 0`. + + It is not currently possible to check for lookup of a missing node.""" import mercurial.revlog opts = _byteskwargs(opts) timer, fm = gettimer(ui, opts)
--- a/tests/test-contrib-perf.t Fri Jan 25 14:53:19 2019 -0500 +++ b/tests/test-contrib-perf.t Mon Jan 28 04:47:40 2019 -0500 @@ -93,7 +93,7 @@ find statistic about potential parameters for the 'perftracecopies' perfignore benchmark operation related to computing ignore - perfindex (no help text available) + perfindex benchmark index creation time followed by a lookup perflinelogedits (no help text available) perfloadmarkers