changeset 653:0743b624fb60

Flush standard output before starting test.
author Martin Geisler <mg@daimi.au.dk>
date Fri, 11 Apr 2008 16:21:52 +0200
parents 9c6a43bbbf8c
children f9fe663c0de1
files apps/benchmark.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/apps/benchmark.py	Mon Apr 07 22:46:15 2008 +0200
+++ b/apps/benchmark.py	Fri Apr 11 16:21:52 2008 +0200
@@ -53,6 +53,7 @@
 # In all cases the time reported is measured from the moment when the
 # operands are ready until all the results are ready.
 
+import sys
 import time
 from optparse import OptionParser
 import operator
@@ -131,15 +132,18 @@
 
     def sync_test(self, _):
         print "Synchronizing test start."
+        sys.stdout.flush()
         sync = self.rt.synchronize()
         sync.addCallback(self.countdown, 3)
 
     def countdown(self, _, seconds):
         if seconds > 0:
             print "Starting test in %d" % seconds
+            sys.stdout.flush()
             reactor.callLater(1, self.countdown, None, seconds - 1)
         else:
             print "Starting test now"
+            sys.stdout.flush()
             self.run_test(None)
 
     def run_test(self, _):