--- a/bench.py Fri Aug 05 12:20:39 2016 +0800
+++ b/bench.py Fri Aug 05 12:27:07 2016 +0800
parser = ArgumentParser(description='Benchmark revisions and put results in the db.')
group = parser.add_mutually_exclusive_group()
-group.add_argument('revsets', metavar='REVSET', default=('last(all(), 120)',), nargs='*', help='update these revisions (default: last 120)')
-group.add_argument('--auto', metavar='MAXREVS', type=int, help='guess revisions, up to MAXREVS')
-parser.add_argument('--marks', metavar='MARKS', default='all', help='test only these commands (comma-separated, default: all)')
-parser.add_argument('--retry', action='store_true', help='try and reduce existing timings')
-parser.add_argument('--mintime', metavar='N', type=float, default=1.0, help='benchmark each command for a total of at least N seconds (default: 1.0)')
-parser.add_argument('--mintries', metavar='N', type=int, default=3, help='run each command at least N times (default: 3)')
+ 'revsets', metavar='REVSET', nargs='*', default=('last(all(), 120)',),
+ help='update these revisions (default: last 120)')
+ '--auto', metavar='MAXREVS', type=int,
+ help='guess revisions, up to MAXREVS')
+ '--marks', metavar='MARKS', default='all',
+ help='test only these commands (comma-separated, default: all)')
+ '--retry', action='store_true',
+ help='try and reduce existing timings')
+ '--mintime', metavar='N', type=float, default=1.0,
+ help='run each command for a total of at least N seconds (default: 1.0)')
+ '--mintries', metavar='N', type=int, default=3,
+ help='run each command at least N times (default: 3)')
def test(mark, mintime, mintries, dropcache=True):