Rubygems | Latest Versions for benchmarkerhttps://rubygems.org/gems2023-09-30T10:26:47Zbenchmarker (1.0.0)https://rubygems.org/gems/benchmarker/versions/1.0.02021-11-13T11:14:18Zkwatchpretty good benchmark library
Benchmarker is a pretty good benchmark tool for Ruby.
Compared to `benchmark.rb` (standard library), Benchmarker has a lot of useful features.
See: https://kwatch.github.io/benchmarker/ruby.html
benchmarker (0.1.0)https://rubygems.org/gems/benchmarker/versions/0.1.02011-03-02T03:58:44Zmakoto kuwataa small utility for benchmarking
Benchmarker is a small utility for benchmarking.
Quick Example (ex0.rb):
require 'rubygems'
require 'benchmarker'
Benchmarker.new(:width=>20, :loop=>100*1000, :cycle=>5, :extra=>1) do |bm|
range = 1..1000
bm.task("each") do
arr = []
range.each {|n| arr << n }
end
bm.task("collect") do
arr = range.collect {|n| n }
end
bm.task("inject") do
arr = range.inject([]) {|a, n| a << n; a }
end
end