mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-24 00:59:02 -05:00
27 lines
560 B
Clojure
27 lines
560 B
Clojure
(ns benchmarks.ruby
|
|
(:require redis))
|
|
|
|
|
|
(dotimes [n 2]
|
|
(redis/with-server
|
|
{}
|
|
(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)))))
|
|
|
|
|
|
|