mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 17:10:50 +00:00
26 lines
565 B
Clojure
26 lines
565 B
Clojure
(ns benchmarks.ruby
|
|
(:require redis))
|
|
|
|
(dotimes [n 4]
|
|
(redis/with-server
|
|
{:db 15}
|
|
(redis/set "foo" "The first line we sent to the server is some text")
|
|
(time
|
|
(dotimes [i 20000]
|
|
(let [key (str "key" i)]
|
|
(redis/set key "The first line we sent to the server is some text")
|
|
(redis/get "foo"))))))
|
|
|
|
|
|
;(redis/with-server
|
|
; {}
|
|
; (redis/set "foo" "The first line we sent to the server is some text")
|
|
; (time
|
|
; (dotimes [i 20000]
|
|
; (let [key (str "push_trim" i)]
|
|
; (redis/lpush key i)
|
|
; (redis/ltrim key 0 30)))))
|
|
|
|
|
|
|