Permalink
Browse files

improve stats

  • Loading branch information...
1 parent 03a3b8f commit 2dfd528d5de01d27488d5479a0b9893e557aa4f1 @sunng87 committed Nov 23, 2011
Showing with 2 additions and 4 deletions.
  1. +2 −4 src/clojalk/core.clj
@@ -491,11 +491,9 @@
all-sessions (vals @sessions)
worker-sessions (filter #(= :worker (:type @%)) all-sessions)
waiting-sessions (filter #(= :waiting (:state @%)) worker-sessions)
- producer-sessions (filter #(= :producer (:type @%)) all-sessions)
- commands-stats @commands
- commands-stats-keys (keys commands-stats)]
+ producer-sessions (filter #(= :producer (:type @%)) all-sessions)]
; (dbg commands-stats)
- (merge (zipmap commands-stats-keys (doall (map #(deref (commands-stats %)) commands-stats-keys)))
+ (merge (into {} (for [i @commands] [(key i) @(val i)]))
{:job-timeouts @job-timeouts
:current-tubes (count @tubes)
:current-connections (count all-sessions)

0 comments on commit 2dfd528

Please sign in to comment.