taoensso / carmine

Redis client + message queue for Clojure
https://www.taoensso.com/carmine
Eclipse Public License 1.0
1.15k stars 130 forks source link

How to call info commandstats #170

Closed anshulp25 closed 8 years ago

anshulp25 commented 8 years ago

Hi,

Normal info* is working fine, but is it possible to get the output of info commandstats. Do API support it ?

anshulp25 commented 8 years ago

Hi,

Sorry for troubling, Was able to resolve it via this snippet

(ns riemann-redis.core
  (:require [taoensso.carmine :as redis])
  (:gen-class))

(defn redis-connection [ host ]
  {:pool {}
   :spec { :host host
           :port 6379
           :timeout 4000
   }
   })

(defn -main
  "I don't do a whole lot ... yet."
  [& args]
 (println (redis/wcar (redis-connection "172.28.128.3") (redis/info "commandstats")))
  )

Output

λ lein run
# Commandstats
cmdstat_info:calls=7,usec=756,usec_per_call=108.00

Cheers !!