@argh.arg('<STR_LIT>', help='<STR_LIT>', type=str)<EOL>@argh.arg('<STR_LIT>', '<STR_LIT>', type=str)<EOL>@argh.arg('<STR_LIT>', '<STR_LIT>', type=to_int)<EOL>@argh.arg('<STR_LIT>', '<STR_LIT>', type=to_int)<EOL>@argh.arg('<STR_LIT>',<EOL>type=to_int,<EOL>help='<STR_LIT>')<EOL>@argh.arg('<STR_LIT:-c>', '<STR_LIT>', type=to_int)<EOL>@argh.arg('<STR_LIT>', '<STR_LIT>', choices=['<STR_LIT>', '<STR_LIT:text>'], default='<STR_LIT:text>')<EOL>@argh.arg('<STR_LIT>', help='<STR_LIT>')<EOL>@argh.arg('<STR_LIT>', choices=('<STR_LIT:all>', '<STR_LIT>'),<EOL>help='<STR_LIT>', default='<STR_LIT>')<EOL>@argh.wrap_errors([KeyboardInterrupt, BrokenPipeError] + client_errors)<EOL>def timeit(hosts=None,<EOL>stmt=None,<EOL>warmup=<NUM_LIT:30>,<EOL>repeat=None,<EOL>duration=None,<EOL>concurrency=<NUM_LIT:1>,<EOL>output_fmt=None,<EOL>fail_if=None,<EOL>sample_mode='<STR_LIT>'):
num_lines = <NUM_LIT:0><EOL>log = Logger(output_fmt)<EOL>with Runner(hosts, concurrency, sample_mode) as runner:<EOL><INDENT>version_info = aio.run(runner.client.get_server_version)<EOL>for line in as_statements(lines_from_stdin(stmt)):<EOL><INDENT>runner.warmup(line, warmup)<EOL>timed_stats = runner.run(line, iterations=repeat, duration=duration)<EOL>r = Result(<EOL>version_info=version_info,<EOL>statement=line,<EOL>timed_stats=timed_stats,<EOL>concurrency=concurrency<EOL>)<EOL>log.result(r)<EOL>if fail_if:<EOL><INDENT>eval_fail_if(fail_if, r)<EOL><DEDENT><DEDENT>num_lines += <NUM_LIT:1><EOL><DEDENT>if num_lines == <NUM_LIT:0>:<EOL><INDENT>raise SystemExit(<EOL>'<STR_LIT>')<EOL><DEDENT>
Run the given statement a number of times and return the runtime stats

    Args:
        fail-if: An expression that causes cr8 to exit with a failure if it
            evaluates to true.
            The expression can contain formatting expressions for:
                - runtime_stats
                - statement
                - meta
                - concurrency
                - bulk_size
            For example:
                --fail-if "{runtime_stats.mean} > 1.34"