Skip to content

Commit

Permalink
Do more iterations in benchmarks
Browse files Browse the repository at this point in the history
To get into the millisecond range.
  • Loading branch information
eerohele committed Nov 28, 2024
1 parent 43eaccc commit 1f6af7c
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions repl/throughput.repl
Original file line number Diff line number Diff line change
Expand Up @@ -76,37 +76,40 @@

"Rad"
(quick-bench
(.join ^CompletableFuture
(redis
[:DEL k]
[:SET k v]
[:GET k])))
(dotimes [_ 100]
(.join ^CompletableFuture
(redis
[:DEL k]
[:SET k v]
[:GET k]))))

(quick-bench
@(redis [:COMMAND :DOCS]))

"Carmine"
(quick-bench
(wcar {:pool my-pool}
(car/del k)
(car/set k v)
(car/get k)))
(dotimes [_ 100]
(wcar {:pool my-pool}
(car/del k)
(car/set k v)
(car/get k))))

(quick-bench
(wcar {:pool my-pool}
(car/command :docs)))

"Jedis"
(quick-bench
(with-open [^Pipeline pipeline (.pipelined jedis-pool)]
(.del pipeline ^String k)
(.set pipeline ^String k ^String v)
(.get pipeline ^String k)
(.syncAndReturnAll pipeline)))
(dotimes [_ 100]
(with-open [^Pipeline pipeline (.pipelined jedis-pool)]
(.del pipeline ^String k)
(.set pipeline ^String k ^String v)
(.get pipeline ^String k)
(.syncAndReturnAll pipeline))))

"Lettuce"
(quick-bench
(do
(dotimes [_ 100]
#_(.setAutoFlushCommands lettuce-connection false)
(.del lettuce-cmd (into-array String [k]))
(.set lettuce-cmd k v)
Expand Down

0 comments on commit 1f6af7c

Please sign in to comment.