Skip to content

Instantly share code, notes, and snippets.

@activelabs
Forked from antirez/hash_memory_test.rb
Created March 10, 2010 09:12
Show Gist options
  • Save activelabs/327708 to your computer and use it in GitHub Desktop.
Save activelabs/327708 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'redis'
r = Redis.new
(0..100000).each{|i|
["name","surname","age","sex","password"].each{|field|
if false
r.set("obj#{i}#{field}","foo")
else
r.hset("obj#{i}",field,"foo")
end
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment