Liking cljdoc? Tell your friends :D

tupelo.profile


defnpcljmacro

(defnp name & forms)

A replacement for clojure.core/defn that accumuldates profiling data. Converts a function like:

(defnp add-1 "Adds one to an arg" [x] (inc x))

to:

(defn add-1 "" ; dummy docstring [x] (with-timer-accum :demo.core/add-1 ; lookup key is fully-qualified function name (inc x))) ; function body unchanged

Does not handle function metadata like (defn ^:private my-fn ...)

A replacement for clojure.core/defn that accumuldates profiling data. Converts a function like:

  (defnp add-1
    "Adds one to an arg"
    [x]
    (inc x))

to:

  (defn add-1
    ""   ; dummy docstring
    [x]
    (with-timer-accum :demo.core/add-1    ; lookup key is fully-qualified function name
      (inc x)))  ; function body unchanged

Does not handle function metadata like (defn ^:private my-fn ...) 
sourceraw docstring

stats-getclj

(stats-get id)

Return basic stats for a given id

Return basic stats for a given id
sourceraw docstring

stats-get-allclj

(stats-get-all)

Return all stats

Return all stats
sourceraw docstring

stats-print-allclj

(stats-print-all)

Prints stats for all keys to stdout

Prints stats for all keys to stdout
sourceraw docstring

stats-updateclj

(stats-update id seconds)

Updates timing stats for a given key & elapsed time

Updates timing stats for a given key & elapsed time
sourceraw docstring

timer-statsclj

source

timer-stats-resetclj

(timer-stats-reset)

Reset timer-stats to empty

Reset timer-stats to empty
sourceraw docstring

with-timer-accumcljmacro

(with-timer-accum id & forms)

Accumulates execution time stats in global stats map under key id.

Accumulates execution time stats in global stats map under key `id`.
sourceraw docstring

with-timer-printcljmacro

(with-timer-print id & forms)

Accumulates execution time stats in global stats map under key id.

Accumulates execution time stats in global stats map under key `id`.
sourceraw docstring

with-timer-resultcljmacro

(with-timer-result & forms)

Times execution of Clojure forms, returning a result map like: {:result result :seconds seconds}

Times execution of Clojure forms, returning a result map like:
{:result result  :seconds seconds} 
sourceraw docstring

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

× close