taoensso.timbre.profiling
Simple logging profiler for Timbre. Highly optimized; supports
sampled profiling in production.
->PData
(->PData m-times m-stats)
Positional factory function for class taoensso.timbre.profiling.PData.
-capture-time!
(-capture-time! id t-elapsed)
(-capture-time! pdata id t-elapsed)
-compile-final-stats!
(-compile-final-stats! clock-time)
-fn-sigs
(-fn-sigs fn-name sigs)
-new-pdata
macro
(-new-pdata)
-with-pdata
macro
(-with-pdata & body)
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.
fnp
macro
(fnp name? [params*] prepost-map? body)
(fnp name? ([params*] prepost-map? body) +)
Like `fn` but wraps fn bodies with `p` macro.
profile
macro
(profile level id & body)
When logging is enabled, executes named body with thread-local profiling
enabled and logs profiling stats. Always returns body's result.
profiled
macro
(profiled expr-to-profile params & body)
Experimental, subject to change!
Low-level profiling util. Executes expr with thread-local profiling
enabled, then executes body with `[<stats> <expr-result>]` binding, e.g:
(profiled "foo" [stats result] (do (println stats) result))
pspy
macro
(pspy id & body)
Profile spy. When thread-local profiling is enabled, records
execution time of named body. Always returns the body's result.
sampling-profile
macro
(sampling-profile level probability id & body)
Like `profile`, but only enables profiling with given probability.