ruby-changes:34297
From: nobu <ko1@a...>
Date: Sun, 8 Jun 2014 04:57:49 +0900 (JST)
Subject: [ruby-changes:34297] nobu:r46378 (trunk): runner.rb: elapsed times
nobu 2014-06-08 04:57:43 +0900 (Sun, 08 Jun 2014) New Revision: 46378 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=46378 Log: runner.rb: elapsed times * bootstraptest/runner.rb (show_progress): show each elapsed times in verbose mode. Modified files: trunk/bootstraptest/runner.rb Index: bootstraptest/runner.rb =================================================================== --- bootstraptest/runner.rb (revision 46377) +++ bootstraptest/runner.rb (revision 46378) @@ -207,14 +207,17 @@ def show_progress(message = '') https://github.com/ruby/ruby/blob/trunk/bootstraptest/runner.rb#L207 elsif @tty $stderr.print "#{@progress_bs}#{@progress[@count % @progress.size]}" end + t = Time.now if @verbose faildesc, errout = with_stderr {yield} + t = Time.now - t if @verbose if !faildesc if @tty $stderr.print "#{@progress_bs}#{@progress[@count % @progress.size]}" + elsif @verbose + $stderr.printf("%6.3f\n", t) else $stderr.print '.' end - $stderr.puts if @verbose else $stderr.print "#{@failed}F#{@reset}" $stderr.puts if @verbose -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/