asv_runner.timing#
Module Contents#
Functions#
Executes a timing benchmark. |
API#
- asv_runner.timing._timing(argv)#
Executes a timing benchmark.
Parameters
- argv (
listofstr) Command line arguments.
Notes
This function parses the command line arguments, including options for setup, number of repeats, timing method, and output format (JSON or not). It selects the appropriate timing function based on the
--timerargument.It creates an instance of the
TimeBenchmarkclass, with the provided statement to be executed, and runs it. The setup is provided from the--setupargument.Once the benchmark is run, it computes the statistics of the results and formats the output. If the
--jsonflag is not set, it prints the output in a human- readable format. Otherwise, it outputs the result, samples, and stats as a JSON.- argv (