2011年11月1日火曜日 Rubyで処理時間を測定する Benchmarkが便利です。 require 'benchmark' Benchmark.bm(10) do |bench| #引数はラベルの位置の調整 bench.report("Process1:") { 処理1 } bench.report("Process2:") { 処理2 } end 結果の例↓ user system total real Process1: 0.015000 0.000000 0.015000 ( 0.933054) Process2: 0.110000 0.000000 0.110000 ( 0.119006) user: user CPU timesystem: system