Liking cljdoc? Tell your friends :D

taoensso.tufte

A simple, fast, monitoring profiler for Clojure/Script.

Usage: wrap+name interesting body exprs with the p macro. Then activate profiling of these wrapped exprs using the profiled or profile macros:

(profiled {} (p :my-fn (my-fn))) ; Returns [<body-result> <?pstats>] (profile {} (p :my-fn (my-fn))) ; Returns <body-result>, dispatches ; ?pstats to any registered handlers.

Extensive facilities are provided for compile-time elision and runtime filtering.

See the relevant docstrings for more info: p, profiled, profile, add-handler! ; Core API

(p [opts & body] [id & body]) ; e.g. (p ::my-pid (do-work)) (profiled [opts & body]) ; e.g. (profiled {:level 2} (my-fn)) (profile [opts & body]) ; e.g. (profiled {:level 2} (my-fn))

(add-handler! [handler-id ns-pattern handler-fn])

How/where to use this library: Tufte profiling is highly optimized: even without elision, you can usually leave profiling enabled in production (e.g. for sampled profiling, or to detect unusual performance behaviour). Tufte's stats maps are well suited to programmatic monitoring.

A simple, fast, monitoring profiler for Clojure/Script.

Usage: wrap+name interesting body exprs with the `p` macro. Then activate
profiling of these wrapped exprs using the `profiled` or `profile` macros:

  (profiled {} (p :my-fn (my-fn))) ; Returns [<body-result> <?pstats>]
  (profile  {} (p :my-fn (my-fn))) ; Returns  <body-result>, dispatches
                                   ; ?pstats to any registered handlers.

Extensive facilities are provided for compile-time elision and runtime
filtering.

See the relevant docstrings for more info:
  `p`, `profiled`, `profile`, `add-handler!` ; Core API

  (p        [opts & body] [id & body]) ; e.g. `(p ::my-pid (do-work))`
  (profiled [opts & body])             ; e.g. `(profiled {:level 2} (my-fn))`
  (profile  [opts & body])             ; e.g. `(profiled {:level 2} (my-fn))`

  (add-handler! [handler-id ns-pattern handler-fn])

How/where to use this library:
  Tufte profiling is highly optimized: even without elision, you can usually
  leave profiling enabled in production (e.g. for sampled profiling, or to
  detect unusual performance behaviour). Tufte's stats maps are well suited
  to programmatic monitoring.
raw docstring

taoensso.tufte.examples

This is mostly stuff for the README atm.

This is mostly stuff for the README atm.
raw docstring

No vars found in this namespace.

taoensso.tufte.impl

Private implementation details. profiled -> [<result> <derefable-and-mergeable-pstats>].

Profiling consists of:

  1. State init ; On thread
  2. Capture ; On thread
  3. State deref ; On thread
  4. ?Merging ; Off thread, on demand (deferred cost)
  5. ?Realization ; Off thread, on demand (deferred cost)

Basic implementation:

  • Capture [<id> <elapsed>]s into single mutable acc
    • May compact acc to id-times, {<id> (<time> ...)}
    • May compact id-times to id-stats, {<id> (<stats/stats> ...)}
  • Merge pours (read-only) acc0 + acc1 into id-times
    • May compact id-times to id-stats, {<id> (<stats/stats> ...)}
  • Realization:
    • Generates {<id> <stats/stats>} from id-times.
    • Merges with id-stats.
Private implementation details.
`profiled` -> [<result> <derefable-and-mergeable-pstats>].

Profiling consists of:
  1. State init   ; On  thread
  2. Capture      ; On  thread
  3. State deref  ; On  thread
  4. ?Merging     ; Off thread, on demand (deferred cost)
  5. ?Realization ; Off thread, on demand (deferred cost)

Basic implementation:
  - Capture [<id> <elapsed>]s into single mutable acc
    - May compact acc      to id-times, {<id> (<time>        ...)}
    - May compact id-times to id-stats, {<id> (<stats/stats> ...)}
  - Merge pours (read-only) acc0 + acc1 into id-times
    - May compact id-times to id-stats, {<id> (<stats/stats> ...)}
  - Realization:
      - Generates {<id> <stats/stats>} from id-times.
      - Merges with id-stats.
raw docstring

taoensso.tufte.timbre

Simple logging handler for integration with Timbre.

Simple logging handler for integration with Timbre.
raw docstring

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

× close