]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add an ioloop command line flag to the benchmark script.
authorBen Darnell <ben@bendarnell.com>
Sun, 7 Apr 2013 17:07:23 +0000 (13:07 -0400)
committerBen Darnell <ben@bendarnell.com>
Sun, 7 Apr 2013 17:07:23 +0000 (13:07 -0400)
demos/benchmark/benchmark.py

index 26d496b3e02023f410a2f961ea592431e39aedbd..ca92e7155ec455a131eb9e7c37fa3f832e0be13b 100755 (executable)
@@ -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()