1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
Commit graph

3 commits

Author SHA1 Message Date
kosaki
6e2a194fa7 * test/benchmark/test_benchmark.rb (#capture_bench_output):
Added explict sleep. Windows have imprecise time support.
	  Thus Tms.new.Add!{} may be or may be not equal 0. The
	  test failure started since r30747.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-01 04:33:00 +00:00
naruse
979ec8df5d * lib/benchmark.rb: fix benchmarck to work with current ruby.
patched by Benoit Daloze [ruby-core:33846] [ruby-dev:43143]
  merged from https://github.com/eregon/ruby/commits/benchmark

*  lib/benchmark (Report#width): update documentation
*  lib/benchmark: document the return value of #benchmark and the
   :list attribute in Report
*  lib/benchmark (Tms#format): rename variables, use String#%
   instead of Kernel.format
*  lib/benchmark: remove undocumented Benchmark::times (an alias
   of Process::times used twice)
*  lib/benchmark (#benchmark): use label_width for the caption
*  lib/benchmark (Tms#initialize): rename variables
*  lib/benchmark: allow title to not be a String and call #to_s
*  lib/benchmark (Benchmark#bm): return an Array of the times with
   the labels
*  lib/benchmark: correct output for Benchmark#bmbm
   (remove the extra space)
*  lib/benchmark: add a few tests for Benchmark::Tms output
*  lib/benchmark: improve style (enumerators, ljust, unused vars)
*  lib/benchmark: add spec about output and return value
*  lib/benchmark: improve basic style and consistency
   no parenthesis for print and use interpolation instead of printf
*  lib/benchmark: remove unnecessary conversions and variables
*  lib/benchmark: correct indentation
*  lib/benchmark: rename the FMTSTR constant and variable to FORMAT
*  lib/benchmark: remove useless exception

*  test/benchmark: remove unused variable warnings

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-01-31 16:11:06 +00:00
kazu
fe0aab0911 * lib/benchmark.rb (Benchmark::Tms#add): fix NameError.
[ruby-dev:40906]

* test/benchmark/test_benchmark.rb: add a test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-02 18:22:29 +00:00