Kouhei Sutou
null+****@clear*****
Tue Jan 21 16:37:08 JST 2014
Kouhei Sutou 2014-01-21 16:37:08 +0900 (Tue, 21 Jan 2014) New Revision: da5e6c4319693799b1c254600b195369cbdac5e6 https://github.com/droonga/drnbench/commit/da5e6c4319693799b1c254600b195369cbdac5e6 Message: Stop GC while benchmarking GC time should not be counted in this benchmark because this benchmark measures out of Ruby processes. Modified files: lib/drnbench/publish-subscribe/gradual-runner.rb Modified: lib/drnbench/publish-subscribe/gradual-runner.rb (+3 -0) =================================================================== --- lib/drnbench/publish-subscribe/gradual-runner.rb 2014-01-21 16:35:23 +0900 (0b89b1a) +++ lib/drnbench/publish-subscribe/gradual-runner.rb 2014-01-21 16:37:08 +0900 (74174bb) @@ -33,11 +33,14 @@ module Drnbench def run_once(results) @runner.increase_subscribers label = "#{@runner.n_subscribers} subscribers" + GC.disable result = Benchmark.bm do |benchmark| benchmark.report(label) do @runner.run end end + GC.enable + GC.start result = result.join("").strip.gsub(/[()]/, "").split(/\s+/) qps =****@confi*****_publishings.to_f / result.last.to_f if****@confi*****_progressively -------------- next part -------------- HTML����������������������������...Download