Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Commit

Permalink
Make complete stat list include stats from non-default clouds.
Browse files Browse the repository at this point in the history
  • Loading branch information
technomancy committed Sep 28, 2012
1 parent 5f1f537 commit e1a956a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/pulse/def.clj
Expand Up @@ -1243,7 +1243,7 @@
(per-second (per-second
(fn [evt] (and (kv? evt :app "pulse") (kv? evt :deploy (conf/deploy)))))) (fn [evt] (and (kv? evt :app "pulse") (kv? evt :deploy (conf/deploy))))))


(def all (def defaults
[ [
; global ; global
events-per-second events-per-second
Expand Down Expand Up @@ -1454,3 +1454,13 @@
; internal ; internal
pulse-events-per-second pulse-events-per-second
]) ])

(defn non-defaults [stat]
(for [cloud (conf/clouds)
:when (not= cloud (conf/default-cloud))
:let [scoped-name (scope-stat cloud (:name stat))
stat-sym (symbol (string/replace scoped-name "." "-"))]
:when (resolve stat-sym)]
(resolve stat-sym)))

(def all (apply concat defaults (map non-defaults defaults)))

0 comments on commit e1a956a

Please sign in to comment.