Liking cljdoc? Tell your friends :D

com.biffweb.admin


flush-pstats!clj

(flush-pstats! {:keys [biff.admin/pstats biff.core/kv-set] :as ctx})

Persists profiling data with :biff.core/kv-set.

Moves data from the pstats atom into the database via kv-set, with :biff.admin/pstats as the KV namespace.

Persists profiling data with :biff.core/kv-set.

Moves data from the `pstats` atom into the database via `kv-set`, with
:biff.admin/pstats as the KV namespace.
sourceraw docstring

moduleclj

(module params)

Returns a biff.core module for the admin dashboard.

Includes routes, biff.ring and biff.graph profiling middleware, an hourly biff.background task that calls flush-pstats!, and initialization for profiling state.

Returns a biff.core module for the admin dashboard.

Includes `routes`, biff.ring and biff.graph profiling middleware, an hourly
biff.background task that calls `flush-pstats!`, and initialization for
profiling state.
sourceraw docstring

profile!clj

(profile! {:biff.admin/keys [pstats]} id f)

Calls f, storing profiling data from Tufte.

Stores the run time of f in the pstats atom, keyed by id.

Calls `f`, storing profiling data from Tufte.

Stores the run time of `f` in the `pstats` atom, keyed by `id`.
sourceraw docstring

routesclj

(routes options)

Returns the admin dashboard's Reitit routes.

options is merged into each request. See docs/schema.md for the available options.

Returns the admin dashboard's Reitit routes.

`options` is merged into each request. See docs/schema.md for the available
options.
sourceraw docstring

use-alertsclj

(use-alerts {:biff.admin/keys [send-email alert-email] :as ctx})

A biff.core component that sends email alerts for logged errors.

Forwards clojure.tools.logging errors to Telemere, and adds a Telemere signal handler that stores logged errors in memory. Errors are reported via email in batches of at most 20. Emails are rate-limited at 1 per 5 minutes. If more than 20 errors are logged in that time, only the most recent 20 are reported.

Errors reported via email are also stored via kv-set and are viewable on the biff.admin dashboard.

A biff.core component that sends email alerts for logged errors.

Forwards clojure.tools.logging errors to Telemere, and adds a Telemere signal
handler that stores logged errors in memory. Errors are reported via email in
batches of at most 20. Emails are rate-limited at 1 per 5 minutes. If more
than 20 errors are logged in that time, only the most recent 20 are reported.

Errors reported via email are also stored via kv-set and are viewable on the
biff.admin dashboard.
sourceraw docstring

wrap-profilingclj

(wrap-profiling handler)

Wraps a Reitit Ring handler with profile!.

Uses the request method and Reitit route name or path template as the profiling ID.

Wraps a Reitit Ring handler with `profile!`.

Uses the request method and Reitit route name or path template as the
profiling ID.
sourceraw docstring

wrap-resolver-profilingclj

(wrap-resolver-profiling resolver)

Wraps a biff.graph resolver with profile!.

The resolver's :biff.graph/id is used as the profiling ID.

Wraps a biff.graph resolver with `profile!`.

The resolver's :biff.graph/id is used as the profiling ID.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close