Permalink
Browse files

Make the benchmarking script's stdout and stderr line buffered.

Reviewers: Craig Silverstein
  • Loading branch information...
fergushenderson committed Aug 2, 2008
1 parent 1329c95 commit 4e88a9600218932b3bddac1f1804ff94e0e3671a
Showing with 10 additions and 0 deletions.
  1. +10 −0 bench/benchmark.py
View
@@ -149,6 +149,16 @@ def show_help():
######################################################################
def main():
"""Run the benchmark per arguments"""
# Ensure that stdout and stderr are line buffered, rather than
# block buffered, as might be the default when running with
# stdout/stderr redirected to a file; this ensures that the
# output is prompt, even when the script takes a long time for
# a single step, and it also avoids confusing intermingling of
# stdout and stderr.
sys.stdout = os.fdopen(1, "w", 1)
sys.stderr = os.fdopen(2, "w", 1)
sum = Summary()
options, args = getopt(sys.argv[1:], 'a:c:n:f:',
['list-projects', 'actions=', 'help', 'compiler=',

0 comments on commit 4e88a96

Please sign in to comment.