From: Ben Darnell Date: Sun, 7 Apr 2013 17:07:23 +0000 (-0400) Subject: Add an ioloop command line flag to the benchmark script. X-Git-Tag: v3.0.1~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d02b031bc98b3d86b0bf3e8278edbcbb49c6d1a0;p=thirdparty%2Ftornado.git Add an ioloop command line flag to the benchmark script. --- diff --git a/demos/benchmark/benchmark.py b/demos/benchmark/benchmark.py index 26d496b3e..ca92e7155 100755 --- a/demos/benchmark/benchmark.py +++ b/demos/benchmark/benchmark.py @@ -39,6 +39,8 @@ define("quiet", type=bool, default=False) # --n=15000 for its JIT to reach full effectiveness define("num_runs", type=int, default=1) +define("ioloop", type=str, default=None) + class RootHandler(RequestHandler): def get(self): self.write("Hello, world") @@ -51,6 +53,8 @@ def handle_sigchld(sig, frame): def main(): parse_command_line() + if options.ioloop: + IOLoop.configure(options.ioloop) for i in xrange(options.num_runs): run()