taoensso.timbre.profiling

DEPRECATED, further development work will be focused on
Tufte at https://github.com/ptaoussanis/tufte.

*pdata*

dynamic

{::pid {:times [t1 t2 ...] ; Times awaiting merge into stats
 :ntimes _          ; (count times)
 :stats {}          ; Cumulative stats
}}

capture-time!

(capture-time! id t-elapsed)

defnp

macro

(defnp name doc-string? attr-map? [params*] prepost-map? body)(defnp name doc-string? attr-map? ([params*] prepost-map? body) + attr-map?)
Like `defn` but wraps fn bodies with `p` macro.

fn-sigs

(fn-sigs fn-name sigs)
Implementation detail.

fnp

macro

(fnp name? [params*] prepost-map? body)(fnp name? ([params*] prepost-map? body) +)
Like `fn` but wraps fn bodies with `p` macro.

format-stats

(format-stats stats & [sort-field])

fq-keyword

macro

(fq-keyword id)
Returns namespaced keyword for given id.

merge-times>stats!

(merge-times>stats!)(merge-times>stats! id)

p

macro

(p id & body)

p*

profile

macro

(profile level id & body)
When logging is enabled, executes named body with profiling enabled. Body
forms wrapped in (pspy) will be timed and time stats logged. Always returns
body's result.

Note that logging appenders will receive both a formatted profiling string AND
the raw profiling stats under a special :profiling-stats key (useful for
queryable db logging).

pspy

macro

(pspy id & body)
Profile spy. When in the context of a *pdata* binding, records execution time
of named body. Always returns the body's result.

pspy*

sampling-profile

macro

(sampling-profile level probability id & body)
Like `profile`, but only enables profiling with given probability.

with-pdata

macro

(with-pdata level & body)