thats most of the benchmarking

strange about the puts in soml, hard to see where a factor of 10 would
come from
This commit is contained in:
Torsten Ruger
2015-11-20 23:51:58 +02:00
parent 28836457c5
commit 96972dab29
13 changed files with 115 additions and 30 deletions

View File

@ -16,7 +16,8 @@ class Stats
end
def show
#puts "no per var"
puts "#{@n} #{@mean} #{@variance}"
puts "#{@n} #{@mean} #{@variance / @n}"
end
end
class Runner
@ -25,12 +26,14 @@ class Runner
@cmd = ARGV[0]
end
def run
{ once } while true
while true
once
end
end
def once
GC.disable
took = Benchmark.measure { %x("#{@cmd}")}.real
took = Benchmark.measure { %x(#{@cmd} > /dev/null)}.real
GC.enable
@stats.add took
@stats.show