Skip to content
Browse files

Make complete stat list include stats from non-default clouds.

  • Loading branch information...
1 parent 5f1f537 commit e1a956a9edb298289f5eb6f4be43d67e5f33eb12 @technomancy technomancy committed Sep 28, 2012
Showing with 11 additions and 1 deletion.
  1. +11 −1 src/pulse/def.clj
View
12 src/pulse/def.clj
@@ -1243,7 +1243,7 @@
(per-second
(fn [evt] (and (kv? evt :app "pulse") (kv? evt :deploy (conf/deploy))))))
-(def all
+(def defaults
[
; global
events-per-second
@@ -1454,3 +1454,13 @@
; internal
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.
Something went wrong with that request. Please try again.