]> git.saurik.com Git - redis.git/blame - client-libraries/clojure/benchmarks/ruby.clj
client libraries updated
[redis.git] / client-libraries / clojure / benchmarks / ruby.clj
CommitLineData
e59229a2 1(ns benchmarks.ruby
2 (:require redis))
3
111d9959 4(dotimes [n 4]
e59229a2 5 (redis/with-server
111d9959 6 {:db 15}
e59229a2 7 (redis/set "foo" "The first line we sent to the server is some text")
8 (time
9 (dotimes [i 20000]
10 (let [key (str "key" i)]
11 (redis/set key "The first line we sent to the server is some text")
12 (redis/get "foo"))))))
13
14
15;(redis/with-server
16; {}
17; (redis/set "foo" "The first line we sent to the server is some text")
18; (time
19; (dotimes [i 20000]
20; (let [key (str "push_trim" i)]
21; (redis/lpush key i)
22; (redis/ltrim key 0 30)))))
23
24
25