Liking cljdoc? Tell your friends :D

perf.core


bind-to-timbre!clj

(bind-to-timbre! log-perf?)

Adds a handler to Tufte to log stats to Timbre using a standard format. Takes an atom called log-perf? which, when dereferenced, tells us whether performance logging is currently enabled.

Adds a handler to Tufte to log stats to Timbre using a standard format.
Takes an atom called `log-perf?` which, when dereferenced, tells us whether
performance logging is currently enabled.
raw docstring

defpfncljmacro

(defpfn name doc argv & body)

Defines a function whose body needs to be profiled. The same as defining a function like this: (defn x "A function" [y] (p :x (stuff y))

Defines a function whose body needs to be profiled. The same as defining a
function like this: `(defn x "A function" [y] (p :x (stuff y))`
raw docstring

pcljmacro

(p k & body)

stat-name-from-request-uriclj

(stat-name-from-request-uri {[method path] :compojure/route})

Grabs the route from a ring request and turns it into a stat name

Grabs the route from a ring request and turns it into a stat name
raw docstring

wrap-timingclj

(wrap-timing log-perf? handler)
(wrap-timing log-perf? stat-name-fn handler)

Provides a compojure middleware for performing Tufte profiling. Takes an atom called log-perf? which, when dereferenced, tells us whether performance logging is currently enabled. Also takes the standard handler. By default, all requests are profiled with the name request. Otherwise, takes a function to generate the stat name from the request

Provides a compojure middleware for performing Tufte profiling. Takes an atom
called `log-perf?` which, when dereferenced, tells us whether performance
logging is currently enabled. Also takes the standard handler. By default, all
requests are profiled with the name `request`. Otherwise, takes a function to
generate the stat name from the request
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close