changeset 32531:7236facefd4f

perf: rename perfrevlog to perfrevlogrevisions We have a couple of commands beginning with "perfrevlog." The actual "perfrevlog" command actually measures resolving the fulltext of multiple revisions. So let's rename it to reflect what it actually does.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 28 May 2017 10:56:28 -0700
parents 3f0936b2cea9
children e4f514627514
files contrib/perf.py tests/test-contrib-perf.t
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/perf.py	Sun May 28 15:43:26 2017 -0400
+++ b/contrib/perf.py	Sun May 28 10:56:28 2017 -0700
@@ -857,12 +857,13 @@
         timer(d, title)
     fm.end()
 
-@command('perfrevlog', revlogopts + formatteropts +
+@command('perfrevlogrevisions', revlogopts + formatteropts +
          [('d', 'dist', 100, 'distance between the revisions'),
           ('s', 'startrev', 0, 'revision to start reading at'),
           ('', 'reverse', False, 'read in reverse')],
          '-c|-m|FILE')
-def perfrevlog(ui, repo, file_=None, startrev=0, reverse=False, **opts):
+def perfrevlogrevisions(ui, repo, file_=None, startrev=0, reverse=False,
+                        **opts):
     """Benchmark reading a series of revisions from a revlog.
 
     By default, we read every ``-d/--dist`` revision from 0 to tip of
@@ -870,7 +871,7 @@
 
     The start revision can be defined via ``-s/--startrev``.
     """
-    rl = cmdutil.openrevlog(repo, 'perfrevlog', file_, opts)
+    rl = cmdutil.openrevlog(repo, 'perfrevlogrevisions', file_, opts)
     rllen = getlen(ui)(rl)
 
     def d():
@@ -907,7 +908,7 @@
     This command measures the time it takes to read+decompress and recompress
     chunks in a revlog. It effectively isolates I/O and compression performance.
     For measurements of higher-level operations like resolving revisions,
-    see ``perfrevlog`` and ``perfrevlogrevision``.
+    see ``perfrevlogrevisions`` and ``perfrevlogrevision``.
     """
     rl = cmdutil.openrevlog(repo, 'perfrevlogchunks', file_, opts)
 
--- a/tests/test-contrib-perf.t	Sun May 28 15:43:26 2017 -0400
+++ b/tests/test-contrib-perf.t	Sun May 28 10:56:28 2017 -0700
@@ -95,11 +95,12 @@
                  (no help text available)
    perfphases    benchmark phasesets computation
    perfrawfiles  (no help text available)
-   perfrevlog    Benchmark reading a series of revisions from a revlog.
    perfrevlogchunks
                  Benchmark operations on revlog chunks.
    perfrevlogrevision
                  Benchmark obtaining a revlog revision.
+   perfrevlogrevisions
+                 Benchmark reading a series of revisions from a revlog.
    perfrevrange  (no help text available)
    perfrevset    benchmark the execution time of a revset
    perfstartup   (no help text available)
@@ -146,7 +147,7 @@
   $ hg perfnodelookup 2
   $ hg perfpathcopies 1 2
   $ hg perfrawfiles 2
-  $ hg perfrevlog .hg/store/data/a.i
+  $ hg perfrevlogrevisions .hg/store/data/a.i
   $ hg perfrevlogrevision -m 0
   $ hg perfrevlogchunks -c
   $ hg perfrevrange