bench/giant.rb in perforated-0.10.0 vs bench/giant.rb in perforated-0.10.1
- old
+ new
@@ -4,11 +4,11 @@
require 'benchmark'
require 'perforated'
require 'active_support/core_ext/object'
require 'redis'
-require 'redis-activesupport'
+require 'readthis'
Structure = Struct.new(:id) do
def to_json
{ id: id, answers: %w[a b c d e f g], tags: [] }.to_json
end
@@ -30,10 +30,10 @@
x.report('memory-2') { perforated.to_json }
puts "Total Objects: #{ObjectSpace.count_objects[:TOTAL]}"
Perforated.configure do |config|
- config.cache = ActiveSupport::Cache::RedisStore.new(host: 'localhost', db: 5)
+ config.cache = Readthis::Cache.new('redis://localhost:6379/5')
end
Perforated.cache.clear
GC.enable