Skip to content

Commit

Permalink
improve stats
Browse files Browse the repository at this point in the history
  • Loading branch information
sunng87 committed Nov 23, 2011
1 parent 03a3b8f commit 2dfd528
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/clojalk/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 2dfd528

Please sign in to comment.