Revision 373836346235 () - Diff

Link to this snippet: http://friendpaste.com/2vnIZk6dATsrjhgLuaoLjU
Embed:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'couchrest'

def save(n)
couch = CouchRest.new("http://localhost:5984")
db = couch.database('geirtest')
n.times { db.save({ "name" => "geir" }) }
end

t1 = Time.now

thread1 = Thread.new{save(100)}
thread1.join

t2 = Time.now

puts t2 - t1