From: <md...@us...> - 2007-11-15 18:36:57
|
Revision: 4316 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=4316&view=rev Author: mdboom Date: 2007-11-15 10:36:51 -0800 (Thu, 15 Nov 2007) Log Message: ----------- Have backend_driver report times for each individual test. Modified Paths: -------------- trunk/matplotlib/examples/backend_driver.py Modified: trunk/matplotlib/examples/backend_driver.py =================================================================== --- trunk/matplotlib/examples/backend_driver.py 2007-11-15 18:36:27 UTC (rev 4315) +++ trunk/matplotlib/examples/backend_driver.py 2007-11-15 18:36:51 UTC (rev 4316) @@ -123,9 +123,7 @@ os.system(' '.join(arglist)) def drive(backend, python=['python'], switches = []): - exclude = failbackend.get(backend, []) - switchstring = ' '.join(switches) # Strip off the format specifier, if any. if backend.startswith('cairo'): _backend = 'cairo' @@ -136,7 +134,7 @@ print '\tSkipping %s, known to fail on backend: %s'%backend continue - print '\tdriving %s %s' % (fname, switchstring) + print ('\tdriving %-40s' % (fname)), basename, ext = os.path.splitext(fname) outfile = basename + '_%s'%backend tmpfile_name = '_tmp_%s.py' % basename @@ -169,7 +167,10 @@ tmpfile.write('savefig("%s", dpi=150)' % outfile) tmpfile.close() + start_time = time.time() run(python + [tmpfile_name, switchstring]) + end_time = time.time() + print (end_time - start_time) #os.system('%s %s %s' % (python, tmpfile_name, switchstring)) os.remove(tmpfile_name) @@ -193,7 +194,8 @@ if not backends: backends = default_backends for backend in backends: - print 'testing %s' % backend + switchstring = ' '.join(switches) + print 'testing %s %s' % (backend, switchstring) t0 = time.time() drive(backend, python, switches) t1 = time.time() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |