Pure helpers for building, normalizing, and rendering terminal callgraph trace data.
Pure helpers for building, normalizing, and rendering terminal callgraph trace data.
(child-return-summary node)Returns a bracketed summary of direct child return values for node.
Returns a bracketed summary of direct child return values for `node`.
(display-value value)Returns a stable, printable representation of value for node labels.
Returns a stable, printable representation of `value` for node labels.
(duration->text {:keys [duration-ns]})Formats a duration in nanoseconds for compact display.
Formats a duration in nanoseconds for compact display.
(empty-trace)Returns an empty trace map ready to receive runtime call frames.
Returns an empty trace map ready to receive runtime call frames.
(fixed-2 n)Formats n with at most two decimal places.
Formats `n` with at most two decimal places.
(node->return-lines node style depth)Returns leaf-to-root terminal lines for node and its descendants.
Returns leaf-to-root terminal lines for `node` and its descendants.
(node->terminal-lines node style prefix last? options)Returns formatted terminal lines for node and its descendants.
Returns formatted terminal lines for `node` and its descendants.
(node->tree trace node-id)Converts the trace node identified by node-id into nested tree data.
Converts the trace node identified by `node-id` into nested tree data.
(node-detail {:keys [status return throwable-class throwable-message] :as node})Returns a compact status suffix for a terminal-rendered node.
Returns a compact status suffix for a terminal-rendered node.
(node-label {:keys [name args]})Returns the (fn-name arg1 arg2 ..) label for a trace node.
Returns the `(fn-name arg1 arg2 ..)` label for a trace node.
(pop-frame trace frame-id outcome)Marks frame-id complete with outcome and pops it from the active stack.
Marks `frame-id` complete with `outcome` and pops it from the active stack.
(public-trace trace)Drops internal bookkeeping from trace while preserving the tree structure.
Drops internal bookkeeping from `trace` while preserving the tree structure.
(push-frame trace frame)Adds a running frame to trace and returns [updated-trace frame-id].
Adds a running frame to `trace` and returns `[updated-trace frame-id]`.
(readable-name name)Converts a function or macro name into a compact display string.
Converts a function or macro name into a compact display string.
(return-flow-label node style)Returns a leaf-to-root label showing how child results combine into node.
Returns a leaf-to-root label showing how child results combine into `node`.
(return-value-label {:keys [status return throwable-class throwable-message]})Returns the compact return label for node.
Returns the compact return label for `node`.
(terminal-label node {:keys [show-meta?] :or {show-meta? true}})Returns the terminal label for node according to options.
Returns the terminal label for `node` according to `options`.
Connector strings used by terminal tree rendering.
Connector strings used by terminal tree rendering.
(trace->return-lines trace)(trace->return-lines trace {:keys [style] :or {style :unicode}})Converts trace into leaf-to-root return flow lines.
Options may include :style (:unicode or :ascii).
Converts `trace` into leaf-to-root return flow lines. Options may include `:style` (`:unicode` or `:ascii`).
(trace->return-text trace)(trace->return-text trace options)Renders trace as a leaf-to-root return flow string.
Renders `trace` as a leaf-to-root return flow string.
(trace->terminal-lines trace)(trace->terminal-lines trace {:keys [style] :or {style :unicode} :as options})Converts trace into terminal tree lines.
Options may include :style (:unicode or :ascii) and :show-meta?.
Converts `trace` into terminal tree lines. Options may include `:style` (`:unicode` or `:ascii`) and `:show-meta?`.
(trace->text trace)(trace->text trace options)Renders trace as a newline-delimited terminal tree string.
Renders `trace` as a newline-delimited terminal tree string.
(trace->tree trace)Converts a public or internal trace map into a vector of root tree nodes.
Converts a public or internal trace map into a vector of root tree nodes.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |