comparison contrib/revsetbenchmarks.py @ 25607:ddb2a648fdbd

revsetbenchmarks: add main documention for the script This allow us to document the fact we can use comment in the file listing revsets.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 16 Jun 2015 20:24:37 -0700
parents 59cdf631388b
children 5265932aad83
comparison
equal deleted inserted replaced
25606:3bb6f5f478a7 25607:ddb2a648fdbd
207 return revset 207 return revset
208 for var in variant.split('+'): 208 for var in variant.split('+'):
209 revset = '%s(%s)' % (var, revset) 209 revset = '%s(%s)' % (var, revset)
210 return revset 210 return revset
211 211
212 212 helptext="""This script will run multiple variants of provided revsets using
213 parser = OptionParser(usage="usage: %prog [options] <revs>") 213 different revisions in your mercurial repository. After the benchmark are run
214 summary output is provided. Use itto demonstrate speed improvements or pin
215 point regressions. Revsets to run are specified in a file (or from stdin), one
216 revsets per line. Line starting with '#' will be ignored, allowing insertion of
217 comments."""
218 parser = OptionParser(usage="usage: %prog [options] <revs>",
219 description=helptext)
214 parser.add_option("-f", "--file", 220 parser.add_option("-f", "--file",
215 help="read revset from FILE (stdin if omitted)", 221 help="read revset from FILE (stdin if omitted)",
216 metavar="FILE") 222 metavar="FILE")
217 parser.add_option("-R", "--repo", 223 parser.add_option("-R", "--repo",
218 help="run benchmark on REPO", metavar="REPO") 224 help="run benchmark on REPO", metavar="REPO")