Skip to content

Commit d02b031

Browse files
committed
Add an ioloop command line flag to the benchmark script.
1 parent 0de3de6 commit d02b031

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

demos/benchmark/benchmark.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
# --n=15000 for its JIT to reach full effectiveness
4040
define("num_runs", type=int, default=1)
4141

42+
define("ioloop", type=str, default=None)
43+
4244
class RootHandler(RequestHandler):
4345
def get(self):
4446
self.write("Hello, world")
@@ -51,6 +53,8 @@ def handle_sigchld(sig, frame):
5153

5254
def main():
5355
parse_command_line()
56+
if options.ioloop:
57+
IOLoop.configure(options.ioloop)
5458
for i in xrange(options.num_runs):
5559
run()
5660

0 commit comments

Comments
 (0)