Skip to content
Browse files

Add something to query against, cleanup

  • Loading branch information...
1 parent e04d3b1 commit 075415e17407a908124e7656cf50bd1826d4afa3 @lstoll committed Feb 17, 2010
Showing with 2 additions and 18 deletions.
  1. +0 −17 4_perf_tests/1_load_100k.rb
  2. +2 −1 4_perf_tests/1_load_20k.rb
View
17 4_perf_tests/1_load_100k.rb
@@ -1,17 +0,0 @@
-require 'riak'
-
-# Connect and get a bucket instance
-client = Riak::Client.new
-bucket = client.bucket("test4")
-
-prev = nil
-
-(1..100000).each do |i|
- puts "Saving item #{i}" if i % 10 == 0
- o = Riak::RObject.new(bucket, i)
- o.content_type = "application/javascript"
- o.data = "{'item': 'one'}"
- o.links << prev.to_link("parent") if prev
- o.store
- prev = o
-end
View
3 4_perf_tests/1_load_20k.rb
@@ -1,4 +1,5 @@
require 'riak'
+require 'json'
# Connect and get a bucket instance
client = Riak::Client.new
@@ -10,7 +11,7 @@
puts "Saving item #{i}" if i % 10 == 0
o = Riak::RObject.new(bucket, i)
o.content_type = "application/javascript"
- o.data = "{'item': 'one'}"
+ o.data = {:item => 'one', :batch => 111 / 10}.to_json
o.links << prev.to_link("parent") if prev
o.store
prev = o

0 comments on commit 075415e

Please sign in to comment.
Something went wrong with that request. Please try again.