1
0
Fork 0

Start GC before benchmarking

This commit is contained in:
Gregory Eremin 2013-12-15 00:54:35 +07:00
parent 72089c5d4b
commit e24c040f01
No known key found for this signature in database
GPG Key ID: 5EFA427EEC26E86C
1 changed files with 2 additions and 1 deletions

View File

@ -12,10 +12,11 @@ module Workbench
def initialize args, &block
puts '#' * TERMINAL_WIDTH
puts '##' + args[:title].center(TERMINAL_WIDTH - 4) + '##'
puts '#' * TERMINAL_WIDTH
puts '#' * TERMINAL_WIDTH
::Benchmark.bm(TERMINAL_WIDTH - BM_WIDTH) do |benchmark|
@@engines.each do |name, attrs|
GC.start
benchmark.report(name) do
args[:loops].times{ yield(name, attrs) }
end