(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.
(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))`
(p k & body)
(stat-name-from-request-uri request)
Grabs the URI from a ring request and turns it into a stat name
Grabs the URI from a ring request and turns it into a stat name
(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
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close