Sha256: 2f665e7f5bab91979bdeab38cb2286e5a0b026b08c1e9581436c118b1f3363b0

Contents?: true

Size: 536 Bytes

Versions: 8

Compression:

Stored size: 536 Bytes

Contents

require 'pp'
require 'pathname'
require 'benchmark'
require 'rubygems'
require 'bundler'

Bundler.require :default, :performance

root_path = Pathname(__FILE__).dirname.join('..').expand_path
lib_path  = root_path.join('lib')
$:.unshift(lib_path)
require 'plucky'

criteria = Plucky::CriteriaHash.new(:foo => 'bar')

PerfTools::CpuProfiler.start("/tmp/criteria_hash") do
  1_000_000.times { criteria[:foo] = 'bar' }
end

puts system "pprof.rb --gif /tmp/criteria_hash > /tmp/criteria_hash.gif"
puts system "open /tmp/criteria_hash.gif"

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
plucky-0.7.0 script/criteria_hash.rb
plucky-0.6.6 script/criteria_hash.rb
plucky-0.6.5 script/criteria_hash.rb
plucky-0.6.4 script/criteria_hash.rb
plucky-0.6.3 script/criteria_hash.rb
plucky-0.6.2 script/criteria_hash.rb
plucky-0.6.1 script/criteria_hash.rb
plucky-0.6.0 script/criteria_hash.rb