模块 Benchmark

Benchmark 模块提供了测量和报告执行 Ruby 代码所用时间的方法。

结果

              user     system      total        real
for:      1.010000   0.000000   1.010000 (  1.015688)
times:    1.000000   0.000000   1.000000 (  1.003611)
upto:     1.030000   0.000000   1.030000 (  1.028098)