Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
binstub vs bundle exec
require 'benchmark/ips'
Benchmark.ips do |x|
x.config(time: 60, warmup: 5)
x.config(stats: :bootstrap, confidence: 95)
x.report('binstub') { `bin/rspec -v`}
x.report('bundle exec') {`bundle exec rspec -v `}
x.report('direct') {`rspec -v `}
end
Warming up --------------------------------------
binstub 1.000 i/100ms
bundle exec 1.000 i/100ms
direct 1.000 i/100ms
Calculating -------------------------------------
1.608 (± 1.1%) i/s - 97.000 in 60.534547s
1.477 (± 0.6%) i/s - 89.000 in 60.315969s
2.828 (± 0.8%) i/s - 170.000 in 60.313360s
with 95.0% confidence
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment