Skip to content

Instantly share code, notes, and snippets.

@alanzhao
Created March 26, 2012 21:35
Show Gist options
  • Save alanzhao/2209925 to your computer and use it in GitHub Desktop.
Save alanzhao/2209925 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'time'
require 'cassandra'
start_timer = Time.now.to_i
client = Cassandra.new('reports', '127.0.0.1:9160')
1000000.times do |i|
client.insert(:test2, i.to_s, {i.to_s => "test"})
client.get(:test2, i.to_s)
client.remove(:test2, i.to_s, i.to_s)
end
end_timer = Time.now.to_i
puts (end_timer - start_timer)
#output
#rvm with ruby 1.9.2
#957
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment