You could use: https://github.com/technomancy/robert-hooke
Its basically an AOP library for Clojure.
You can use "with-hooks-disabled" in your tests to disable the hooks that
have side effects.
On Friday, 11 November 2016 21:42:59 UTC-8, Shantanu Kumar wrote:
>
> Hi Tianxiang,
>
> In my experie
Hi Tianxiang,
In my experience a good way to decouple a non-trivial fn with metrics is to
make the fn provide hooks for various events when metrics may be gathered.
(defn nop [& args])
(defn foo->bar [foo {:keys [on-foo on-bar] :or {on-foo nop on-bar nop} :as
options}]
(on-foo)
(let [bar (
What are some good ways of handling metric gathering (or, more generally,
AOP) in Clojure?
Suppose we have an application in which there is a transformation function,
foo->bar. Every time a foo is input to foo->bar, we'd like to increment the
foo-counter. Every time a bar is produced, we'd like