Skip to content

Commit

Permalink
[irbrc] add quick method that benchmarks stuff for us
Browse files Browse the repository at this point in the history
  • Loading branch information
pitr committed Oct 15, 2012
1 parent c3dce47 commit c65e9fb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions irbrc
Expand Up @@ -55,3 +55,13 @@ end
def paste
`pbpaste`
end

def quick(repetitions=100, &block)
require 'benchmark'

Benchmark.bmbm do |b|
b.report {repetitions.times &block}
end
nil
end

0 comments on commit c65e9fb

Please sign in to comment.