Skip to content

delano/benelux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

140 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A mad way to time Ruby codes

  • A replacement for Benchmark.measure

  • Create timers for any Ruby method

  • Store arbitrary messages

  • Granular statistics

  • Thread-safe

require 'benelux'

# Similar to Benchmark.measure but you specify the
# number of times to run the block and the number
# repetitions. 
tms = Benelux.bm(1000000, 5) do
  rand
end

# Similar to Benchmark::Tms with the addition of
# standard deviation, mean value, and total, for 
# each of the times.    
tms.samples              # => 5
tms.real                 # => 0.45
tms.real.sd              # => 0.04
tms.utime                # => 0.44
tms.utime.sd             # => 0.02

Get it in one of the following ways:

$ gem install benelux --source http://gemcutter.org
$ sudo gem install benelux --source http://gemcutter.org
$ git clone git://github.com/delano/benelux.git
  • Alexis Sellier for fielding my Ruby questions

  • Tara Dougans for the motivational speeches

See LICENSE.txt

About

A mad timeline for your Ruby codes.

Resources

License

Stars

6 stars

Watchers

1 watching

Forks

Packages

 
 
 

Contributors

Languages