(defnp name & forms)
A replacement for clojure.core/defn that accumuldates profiling data. Converts a function like:
(defnp add-1 "Adds one to an arg" [x] (inc x))
to:
(defn add-1 "" ; dummy docstring [x] (with-timer-accum :demo.core/add-1 ; lookup key is fully-qualified function name (inc x))) ; function body unchanged
Does not handle function metadata like (defn ^:private my-fn ...)
A replacement for clojure.core/defn that accumuldates profiling data. Converts a function like: (defnp add-1 "Adds one to an arg" [x] (inc x)) to: (defn add-1 "" ; dummy docstring [x] (with-timer-accum :demo.core/add-1 ; lookup key is fully-qualified function name (inc x))) ; function body unchanged Does not handle function metadata like (defn ^:private my-fn ...)
(stats-get id)
Return basic stats for a given id
Return basic stats for a given id
(stats-update id seconds)
Updates timing stats for a given key
Updates timing stats for a given key
(timer-stats-reset)
Reset timer-stats to empty
Reset timer-stats to empty
(with-timer-accum id & forms)
Prints id
and the elapsed (elapsed) execution time for a set of forms.
Prints `id` and the elapsed (elapsed) execution time for a set of forms.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close