Created
May 9, 2014 14:06
-
-
Save xeago/e472d32a336f42f2d5b3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn ratio-calc | |
[events] | |
(let [ratio | |
(/ (count (filter #(= "critical" (:state %)) events)) | |
(count events))] | |
(assoc (last events) :metric ratio))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment