Skip to content

jcasts/benchrb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BenchRb

Description

Simple command line benchmarking for Ruby

Synopsis

From the command line:

$ benchrb -n 100 "sleep 0.01"
$ benchrb # Interactive mode

From Ruby:

Start an interactive prompt inline

# Runs each command 100 times in the current binding
bench(100, binding)

Run a single benchmark

bench do
  # code to benchmark here
end

# Same but 100 times, eval-ing a String
bench 100, "code to benchmark"

Requirements

  • Ruby 1.9 or greater

Install

  • gem install benchrb

Developers

After checking out the source, run:

$ rake newb

This task will install any missing dependencies, run the tests/specs, and generate the RDoc.

License

(The MIT License)

Copyright © 2012 Jeremie Castagna

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ‘Software’), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED ‘AS IS’, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Simple cmd line benchmarking for Ruby

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages