def METHOD_NAME():
    cmdline = argparse.ArgumentParser(description='Run benchmarks')
    cmdline.add_argument('-autotime', default=3.0, type=float, metavar='seconds',
                         help='''autoscale iterations close to this time per benchmark,
                         in seconds (default: %(default).1f)''')
    cmdline.add_argument('-collect', default=False, action='store_true',
                         help='stop after collecting, useful for debugging this tool')
    cmdline.add_argument('-filter', default='', metavar='regex',
                         help='process benchmarks matching regex (default: all)')
    cmdline.add_argument('-iters', default=None, type=int, metavar='int',
                         help='force this number of iterations (default: auto)')
    cmdline.add_argument('-repeat', default=5, type=int, metavar='int',
                         help='repeat each benchmark, report best result (default: %(default)d)')
    args = cmdline.parse_args()
    filter_re = re.compile(args.filter)
    bs = collect(filter_re.search)
    if args.filter and not bs:
        # TODO stderr
        print('error: no benchmarks matched by filter "{}"'.format(args.filter))
        sys.exit(1)
    if args.collect:
        bs.sort(key=lambda b: b.name)
        print('\n'.join(b.name for b in bs))
        return
    if not bs:
        raise Exception('no benchmarks to run')
    # execute in random order
    random.shuffle(bs)
    for b in bs:
        b.iters = args.iters or optimal_iters(b.func, target_time=args.autotime)
        b.run()
    # print results in alphabetic order
    max_name_len = max(len(b.name) for b in bs)
    bs.sort(key=lambda b: b.name)
    for b in bs:
        print(b.format_result(name_pad_to=max_name_len))