On current master:
$ ruby benchmarkips.rb
0.200000 0.010000 0.210000 ( 0.248978)
$ ruby benchmarkips.rb
0.200000 0.010000 0.210000 ( 0.249966)
$ ruby benchmarkips.rb
0.200000 0.010000 0.210000 ( 0.250471)
$ ruby benchmarkips.rb
0.200000 0.020000 0.220000 ( 0.253052)
$ ruby benchmarkips.rb
0.200000 0.010000 0.210000 ( 0.251087)
On checkout-queries-review:
$ ruby benchmarkips.rb
0.180000 0.010000 0.190000 ( 0.224924)
$ ruby benchmarkips.rb
0.190000 0.010000 0.200000 ( 0.234370)
$ ruby benchmarkips.rb
0.180000 0.020000 0.200000 ( 0.228028)
$ ruby benchmarkips.rb
0.180000 0.010000 0.190000 ( 0.222270)
$ ruby benchmarkips.rb
0.190000 0.010000 0.200000 ( 0.228578)
Script:
require 'benchmark'
require 'benchmark/ips'
require File.expand_path("../config/environment", __FILE__)
module Spree
order = Spree::Order.create email: '[email protected]'
variant = Spree::Variant.find(2)
puts Benchmark.measure { order.contents.add variant }
end