RubyGems Navigation menu

benchmarker 0.1.0

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

Versions:

  1. 0.1.0 - March 1, 2011 (23 KB)

Authors:

  • makoto kuwata

Owners:

8e1efd5009e8efa38aa4393bc223f3c5

Total downloads 1,840

For this version 1,840

Required Ruby Version: None

Licenses:

N/A

Gemfile:
gem 'benchmarker', '~> 0.1.0' = Copy to clipboard Copied!

install:
gem install benchmarker = Copy to clipboard Copied!

Links: