asv.commands.preview

Classes

Preview

Helper class that provides a standard way to create an ABC using

Functions

random_ports(port, n)

Generate a list of n random ports near the given port.

create_httpd(handler_cls[, port])

Module Contents

asv.commands.preview.random_ports(port, n)[source]

Generate a list of n random ports near the given port.

The first 5 ports will be sequential, and the remaining n-5 will be randomly selected in the range [port-2*n, port+2*n].

asv.commands.preview.create_httpd(handler_cls, port=0)[source]
class asv.commands.preview.Preview[source]

Helper class that provides a standard way to create an ABC using inheritance.

classmethod setup_arguments(subparsers)[source]

Method to add the parser and arguments of the command.

In most cases, subparser.add_parser(cmd_name) should be called to add the command (where cmd_name is for example run or continuous). And then call add_argument to the returned parser, to add the command arguments.

classmethod run_from_conf_args(conf, args)[source]

Call the run method (i.e. cls.run) with the right arguments from conf and args. In most cases this is just something like clf.run(conf=conf, my_arg_1=args.my_arg_1, my_arg_2=args.my_arg_2, …).

classmethod run(conf, port=0, browser=False)[source]