Configuration map. Indicates which namespaces should be used to shelf workspaces and recordings.
Configuration map. Indicates which namespaces should be used to shelf workspaces and recordings.
(p-a tree)
An alias for pro-analyze
.
Takes a tree (workspace, recording, query result) and assocs profile
data to it at :profile.
An alias for `pro-analyze`. Takes a tree (workspace, recording, query result) and assocs profile data to it at :profile.
(p-gr tree)
An alias for pro-gross-repeats
.
Takes a tree with profilings data (see pro-analyze
) and prints a
table of functions and their profile metrics, sorted by gross time of
repeated arguments. 'Gross of repeats' is the amount of time spent in
a function during calls where the args match those of a previous call
to the function. Functions with high gross of repeats may be
candidates for memoization.
An alias for `pro-gross-repeats`. Takes a tree with profilings data (see `pro-analyze`) and prints a table of functions and their profile metrics, sorted by gross time of repeated arguments. 'Gross of repeats' is the amount of time spent in a function during calls where the args match those of a previous call to the function. Functions with high gross of repeats may be candidates for memoization.
(p-nt tree)
An alias for pro-net-time
.
Takes a tree with profilings data (see pro-analyze
) and prints a
table of functions and their profile metrics, sorted by net time
sum. 'Net time sum' is the amount of time spent in a function minus
the time spent executing its children. Functions with high net time
sum may be candidates for optimization.
An alias for `pro-net-time`. Takes a tree with profilings data (see `pro-analyze`) and prints a table of functions and their profile metrics, sorted by net time sum. 'Net time sum' is the amount of time spent in a function minus the time spent executing its children. Functions with high net time sum may be candidates for optimization.
(pro-analyze tree)
Takes a tree (workspace, recording, query result) and assocs profile data to it at :profile.
Takes a tree (workspace, recording, query result) and assocs profile data to it at :profile.
(pro-gross-repeats tree)
Takes a tree with profilings data (see pro-analyze
) and prints a
table of functions and their profile metrics, sorted by gross time of
repeated arguments. 'Gross of repeats' is the amount of time spent in
a function during calls where the args match those of a previous call
to the function. Functions with high gross of repeats may be
candidates for memoization.
Takes a tree with profilings data (see `pro-analyze`) and prints a table of functions and their profile metrics, sorted by gross time of repeated arguments. 'Gross of repeats' is the amount of time spent in a function during calls where the args match those of a previous call to the function. Functions with high gross of repeats may be candidates for memoization.
(pro-net-time tree)
Takes a tree with profilings data (see pro-analyze
) and prints a
table of functions and their profile metrics, sorted by net time
sum. 'Net time sum' is the amount of time spent in a function minus
the time spent executing its children. Functions with high net time
sum may be candidates for optimization.
Takes a tree with profilings data (see `pro-analyze`) and prints a table of functions and their profile metrics, sorted by net time sum. 'Net time sum' is the amount of time spent in a function minus the time spent executing its children. Functions with high net time sum may be candidates for optimization.
(q & body)
An alias for ws-query-print
.
Queries the trace record of the active workspace and prints the results.
An alias for `ws-query-print`. Queries the trace record of the active workspace and prints the results.
(qbn s)
An alias for query-by-name
.
Produces a vector like [:name 'func] for s
equal to 'func. Just a
little shortcut for when querying by a function name.
An alias for `query-by-name`. Produces a vector like [:name 'func] for `s` equal to 'func. Just a little shortcut for when querying by a function name.
(query-by-name s)
Produces a vector like [:name 'func] for s
equal to 'func. Just a
little shortcut for when querying by a function name.
Produces a vector like [:name 'func] for `s` equal to 'func. Just a little shortcut for when querying by a function name.
There are several querying functions. Many of them take a variadic
body
argument. The syntax of the body
argument is described
below:
Body may or may not begin with a keyword. If it doesn't, body is one or more vectors which specify a query.
If it does being with a keyword, the syntax rules of that keyword apply to the args that follow. The keyword acts as a modifier that expands the query results to include nodes that have a specified type of relationship with any nodes matching the query. The modifiers are listed here:
:a -- returns ancestors of matching nodes :d -- returns descendants of matching nodes :s -- returns siblings of matching nodes :w -- wildcard! returns ancestors, descendants and siblings of matching nodes :r -- range; takes exactly two query vectors and returns nodes that are both descendants of the first and ancestors of the second
Additionally, the keywords :a, :d, :s and :w take an optional numeric argument which precedes the vector queries. This number specifies a limit on the number of relative hops that will be taken.
A query clause may be a vector or a symbol. A vector is applied in a
get-in
fashion to each trace node, with the final element acting as
a matching value or predicate function. If the final value is truthy,
the node is included in the query result set. For example, a body
of
:a 2 [:arg-map 'fruit :apple]
would match any trace node where an argument fruit
took a
value :apple, as well as the parent and grandparent of that node.
If the query is a symbol instead of a vector, the query will match any
node whose function name matches the symbol. For example, a body
of
somefunc
is equivalent to: [:name 'somefunc]
There are several querying functions. Many of them take a variadic `body` argument. The syntax of the `body` argument is described below: Body may or may not begin with a keyword. If it doesn't, body is one or more vectors which specify a query. If it does being with a keyword, the syntax rules of that keyword apply to the args that follow. The keyword acts as a modifier that expands the query results to include nodes that have a specified type of relationship with any nodes matching the query. The modifiers are listed here: :a -- returns ancestors of matching nodes :d -- returns descendants of matching nodes :s -- returns siblings of matching nodes :w -- wildcard! returns ancestors, descendants and siblings of matching nodes :r -- range; takes exactly two query vectors and returns nodes that are both descendants of the first and ancestors of the second Additionally, the keywords :a, :d, :s and :w take an optional numeric argument which precedes the vector queries. This number specifies a limit on the number of relative hops that will be taken. A query clause may be a vector or a symbol. A vector is applied in a `get-in` fashion to each trace node, with the final element acting as a matching value or predicate function. If the final value is truthy, the node is included in the query result set. For example, a `body` of :a 2 [:arg-map 'fruit :apple] would match any trace node where an argument `fruit` took a value :apple, as well as the parent and grandparent of that node. If the query is a symbol instead of a vector, the query will match any node whose function name matches the symbol. For example, a `body` of somefunc is equivalent to: [:name 'somefunc]
(r-l! slot & [force])
An alias for rec-load!
.
Loads a recording from the shelf namespace into the active
position. Will not overwrite an un-saved active recording unless
active
equals :f
An alias for `rec-load!`. Loads a recording from the shelf namespace into the active position. Will not overwrite an un-saved active recording unless `active` equals :f
(r-lf! src & [force])
An alias for rec-load-from!
.
Loads a recording from the provided source. Source may be a workspace
An alias for `rec-load-from!`. Loads a recording from the provided source. Source may be a workspace
(r-lfw! & [force])
An alias for rec-load-from-ws!
.
Loads the active workspace into the active record.
An alias for `rec-load-from-ws!`. Loads the active workspace into the active record.
(r-q & body)
An alias for rec-query
.
Queries the active trace recording.
An alias for `rec-query`. Queries the active trace recording.
(r-rst!)
An alias for rec-reset!
.
Removes all traces set by active workspace. Resets the active workspace to nil.
An alias for `rec-reset!`. Removes all traces set by active workspace. Resets the active workspace to nil.
(r-s!)
An alias for rec-save!
.
Saves active recording to the recording shelf namespace in the pre-specified slot.
An alias for `rec-save!`. Saves active recording to the recording shelf namespace in the pre-specified slot.
(r-sa! slot)
An alias for rec-save-as!
.
Saves active recording to the recording shelf namespace in the specified slot
.
An alias for `rec-save-as!`. Saves active recording to the recording shelf namespace in the specified `slot`.
(rec-load! slot & [force])
Loads a recording from the shelf namespace into the active
position. Will not overwrite an un-saved active recording unless
active
equals :f
Loads a recording from the shelf namespace into the active position. Will not overwrite an un-saved active recording unless `active` equals :f
(rec-load-from! src & [force])
Loads a recording from the provided source. Source may be a workspace
Loads a recording from the provided source. Source may be a workspace
(rec-load-from-ws! & [force])
Loads the active workspace into the active record.
Loads the active workspace into the active record.
(rec-query & body)
Queries the active trace recording.
Queries the active trace recording.
(rec-reset!)
Removes all traces set by active workspace. Resets the active workspace to nil.
Removes all traces set by active workspace. Resets the active workspace to nil.
(rec-save!)
Saves active recording to the recording shelf namespace in the pre-specified slot.
Saves active recording to the recording shelf namespace in the pre-specified slot.
(rec-save-as! slot)
Saves active recording to the recording shelf namespace in the specified slot
.
Saves active recording to the recording shelf namespace in the specified `slot`.
The active recording. Used by default in any function prefixed rec-
or r-
.
The active recording. Used by default in any function prefixed `rec-` or `r-`.
(src-in-meta & body)
Takes a body
form that evaluates to a var. Alters the var's meta
to include the body source in :source. Useful for functions where
source is not otherwise available -- ex eval'd outside the context of
a file.
Usage:
user> (sd/src-in-meta defn f1 [a] (inc a)) {:arglists ([a]), :line 1, :column 1, :file "/tmp/form-init5170899558834081664.clj", :name f1, :ns #object[clojure.lang.Namespace 0x7d351966 "user"], :source (defn f1 [a] (inc a))}
user> (-> #'f1 meta :source) (defn f1 [a] (inc a))
Takes a `body` form that evaluates to a var. Alters the var's meta to include the body source in :source. Useful for functions where source is not otherwise available -- ex eval'd outside the context of a file. Usage: user> (sd/src-in-meta defn f1 [a] (inc a)) {:arglists ([a]), :line 1, :column 1, :file "/tmp/form-init5170899558834081664.clj", :name f1, :ns #object[clojure.lang.Namespace 0x7d351966 "user"], :source (defn f1 [a] (inc a))} user> (-> #'f1 meta :source) (defn f1 [a] (inc a))
(t-pr trees)
An alias for trees-print
.
Prints trees
, which may be either trace tree, a collection of trace
trees, or a known structure (workspace, recording) that contains a trace tree.
An alias for `trees-print`. Prints `trees`, which may be either trace tree, a collection of trace trees, or a known structure (workspace, recording) that contains a trace tree.
(t-query tree & body)
An alias for tree-query
.
Queries tree
, a trace tree.
An alias for `tree-query`. Queries `tree`, a trace tree.
(tree-query tree & body)
Queries tree
, a trace tree.
Queries `tree`, a trace tree.
(trees-print trees)
Prints trees
, which may be either trace tree, a collection of trace
trees, or a known structure (workspace, recording) that contains a trace tree.
Prints `trees`, which may be either trace tree, a collection of trace trees, or a known structure (workspace, recording) that contains a trace tree.
(w-aitf! fn-sym)
An alias for ws-add-inner-trace-fn!
.
fn-sym
is a symbol that references an existing function. Applies an
enabled inner trace to said functions. Adds the traces to the active
workspace trace set. Deep traces capture all functions calls that
occurr within the traced function.
An alias for `ws-add-inner-trace-fn!`. `fn-sym` is a symbol that references an existing function. Applies an enabled *inner* trace to said functions. Adds the traces to the active workspace trace set. Deep traces capture all functions calls that occurr within the traced function.
(w-atf! fn-sym)
An alias for ws-add-trace-fn!
.
fn-sym
is a symbol that references an existing function. Applies an
enabled trace to said functions. Adds the traces to the active
workspace trace set.
An alias for `ws-add-trace-fn!`. `fn-sym` is a symbol that references an existing function. Applies an enabled trace to said functions. Adds the traces to the active workspace trace set.
(w-atn! ns-sym)
An alias for ws-add-trace-ns!
.
ns-sym
is a symbol that references an existing namespace. Applies an enabled
trace to all functions in that namespace. Adds the traces to the active workspace trace set.
An alias for `ws-add-trace-ns!`. `ns-sym` is a symbol that references an existing namespace. Applies an enabled trace to all functions in that namespace. Adds the traces to the active workspace trace set.
(w-cat!)
An alias for ws-cycle-all-traces!
.
Disables and enables all traces in active workspace. You shouldn't
need to use this, but you might.
An alias for `ws-cycle-all-traces!`. Disables and enables all traces in active workspace. You shouldn't need to use this, but you might.
(w-cl!)
An alias for ws-clear-log!
.
Clears the log of the active workspace, but preserves traces and other
properties.
An alias for `ws-clear-log!`. Clears the log of the active workspace, but preserves traces and other properties.
(w-dat!)
An alias for ws-disable-all-traces!
.
Disables all traces in active workspace. The active workspace trace set will be
preserved and can be re-enabled.
An alias for `ws-disable-all-traces!`. Disables all traces in active workspace. The active workspace trace set will be preserved and can be re-enabled.
(w-drf! & [w])
An alias for ws-deref!
.
Returns the value of the active workspace, but with all children
recursively dereferenced. This workspace value will not receive new
trace entries.
An alias for `ws-deref!`. Returns the value of the active workspace, but with all children recursively dereferenced. This workspace value will not receive new trace entries.
(w-dta qual-sym args)
An alias for ws-inner-trace-apply
.
Deep traces the function indicated by the qualified symbol,
qual-sym
, and then call it with arguments args
. Returns the
resulting workspace, which is NOT the active workspace.
An alias for `ws-inner-trace-apply`. Deep traces the function indicated by the qualified symbol, `qual-sym`, and then call it with arguments `args`. Returns the resulting workspace, which is NOT the active workspace.
(w-dtf! fn-sym)
An alias for ws-disable-trace-fn!
.
Disables a trace on a function. The active workspace trace set will
be preserved and can be re-enabled.
An alias for `ws-disable-trace-fn!`. Disables a trace on a function. The active workspace trace set will be preserved and can be re-enabled.
(w-eat!)
An alias for ws-enable-all-traces!
.
Enables any disabled traces in active workspace.
An alias for `ws-enable-all-traces!`. Enables any disabled traces in active workspace.
(w-etf! fn-sym)
An alias for ws-enable-trace-fn!
.
Enables a trace on a function. Function must already have trace added
to active workspace.
An alias for `ws-enable-trace-fn!`. Enables a trace on a function. Function must already have trace added to active workspace.
(w-ga!)
An alias for ws-get-active!
.
Returns the active workspace with atoms intact.
An alias for `ws-get-active!`. Returns the active workspace with atoms intact.
(w-itap qual-sym args)
An alias for ws-inner-trace-apply-print
.
Run ws-inner-trace-apply
then prints the resulting workspace.
An alias for `ws-inner-trace-apply-print`. Run `ws-inner-trace-apply` then prints the resulting workspace.
(w-l! slot & [force])
An alias for ws-load!
.
Loads a workspace from the shelf namespace into the active
position. Will not overwrite an un-saved active workspace unless
force
equals :f
An alias for `ws-load!`. Loads a workspace from the shelf namespace into the active position. Will not overwrite an un-saved active workspace unless `force` equals :f
(w-pr & [ws])
An alias for ws-print
.
Prints either the active workspace, or the first argument, using the
default view, which puts safety restrictions on the output to
prevent overwhelming hugeness.
An alias for `ws-print`. Prints either the active workspace, or the first argument, using the default view, which puts safety restrictions on the output to prevent overwhelming hugeness.
(w-q & body)
An alias for ws-query
.
Queries the trace record of the active workspace.
An alias for `ws-query`. Queries the trace record of the active workspace.
(w-qp & body)
An alias for ws-query-print
.
Queries the trace record of the active workspace and prints the results.
An alias for `ws-query-print`. Queries the trace record of the active workspace and prints the results.
(w-rat!)
An alias for ws-remove-all-traces!
.
Disables and removes all traces in the active workspace.
An alias for `ws-remove-all-traces!`. Disables and removes all traces in the active workspace.
(w-rs!)
An alias for ws-reset!
.
Removes all traces set by active workspace. Resets the active workspace to nil.
An alias for `ws-reset!`. Removes all traces set by active workspace. Resets the active workspace to nil.
(w-rtf! fn-sym)
An alias for ws-remove-trace-fn!
.
Disables and removes a trace on a function from the active workspace.
An alias for `ws-remove-trace-fn!`. Disables and removes a trace on a function from the active workspace.
(w-rtn! ns-sym)
An alias for ws-remove-trace-ns!
.
ns-sym
is a symbol that references an existing namespace. Removes all
traces applied to the namespace.
An alias for `ws-remove-trace-ns!`. `ns-sym` is a symbol that references an existing namespace. Removes all traces applied to the namespace.
(w-s!)
An alias for ws-save!
.
Saves active workspace to the workspace shelf namespace in the pre-specified slot.
An alias for `ws-save!`. Saves active workspace to the workspace shelf namespace in the pre-specified slot.
(w-sa! slot)
An alias for ws-save-as!
.
Saves active workspace to the workspace shelf namespace in the specified slot
.
An alias for `ws-save-as!`. Saves active workspace to the workspace shelf namespace in the specified `slot`.
(w-st & [ws])
An alias for ws-show-traced
.
Pretty prints the map that contains the traces that are currently in
place.
An alias for `ws-show-traced`. Pretty prints the map that contains the traces that are currently in place.
(with-view & body)
Puts the view in effect for the lexical scope.
Puts the view in effect for the lexical scope.
The active workspace. Used by default in any function prefixed ws-
or w-
.
The active workspace. Used by default in any function prefixed `ws-` or `w-`.
(ws-add-inner-trace-fn! fn-sym)
fn-sym
is a symbol that references an existing function. Applies an
enabled inner trace to said functions. Adds the traces to the active
workspace trace set. Deep traces capture all functions calls that
occurr within the traced function.
`fn-sym` is a symbol that references an existing function. Applies an enabled *inner* trace to said functions. Adds the traces to the active workspace trace set. Deep traces capture all functions calls that occurr within the traced function.
(ws-add-trace-fn! fn-sym)
fn-sym
is a symbol that references an existing function. Applies an
enabled trace to said functions. Adds the traces to the active
workspace trace set.
`fn-sym` is a symbol that references an existing function. Applies an enabled trace to said functions. Adds the traces to the active workspace trace set.
(ws-add-trace-ns! ns-sym)
ns-sym
is a symbol that references an existing namespace. Applies an enabled
trace to all functions in that namespace. Adds the traces to the active workspace trace set.
`ns-sym` is a symbol that references an existing namespace. Applies an enabled trace to all functions in that namespace. Adds the traces to the active workspace trace set.
(ws-clear-log!)
Clears the log of the active workspace, but preserves traces and other properties.
Clears the log of the active workspace, but preserves traces and other properties.
(ws-cycle-all-traces!)
Disables and enables all traces in active workspace. You shouldn't need to use this, but you might.
Disables and enables all traces in active workspace. You shouldn't need to use this, but you might.
(ws-deref! & [w])
Returns the value of the active workspace, but with all children recursively dereferenced. This workspace value will not receive new trace entries.
Returns the value of the active workspace, but with all children recursively dereferenced. This workspace value will not receive new trace entries.
(ws-disable-all-traces!)
Disables all traces in active workspace. The active workspace trace set will be preserved and can be re-enabled.
Disables all traces in active workspace. The active workspace trace set will be preserved and can be re-enabled.
(ws-disable-trace-fn! fn-sym)
Disables a trace on a function. The active workspace trace set will be preserved and can be re-enabled.
Disables a trace on a function. The active workspace trace set will be preserved and can be re-enabled.
(ws-disable-trace-ns! ns-sym)
Enables a trace on a namespace. Namespace must already have trace added to active workspace.
Enables a trace on a namespace. Namespace must already have trace added to active workspace.
(ws-enable-all-traces!)
Enables any disabled traces in active workspace.
Enables any disabled traces in active workspace.
(ws-enable-trace-fn! fn-sym)
Enables a trace on a function. Function must already have trace added to active workspace.
Enables a trace on a function. Function must already have trace added to active workspace.
(ws-enable-trace-ns! ns-sym)
Enables a trace on a namespace. Namespace must already have trace added to active workspace.
Enables a trace on a namespace. Namespace must already have trace added to active workspace.
(ws-get-active!)
Returns the active workspace with atoms intact.
Returns the active workspace with atoms intact.
(ws-inner-trace-apply qual-sym args)
Deep traces the function indicated by the qualified symbol,
qual-sym
, and then call it with arguments args
. Returns the
resulting workspace, which is NOT the active workspace.
Deep traces the function indicated by the qualified symbol, `qual-sym`, and then call it with arguments `args`. Returns the resulting workspace, which is NOT the active workspace.
(ws-inner-trace-apply-print qual-sym args)
Run ws-inner-trace-apply
then prints the resulting workspace.
Run `ws-inner-trace-apply` then prints the resulting workspace.
(ws-load! slot & [force])
Loads a workspace from the shelf namespace into the active
position. Will not overwrite an un-saved active workspace unless
force
equals :f
Loads a workspace from the shelf namespace into the active position. Will not overwrite an un-saved active workspace unless `force` equals :f
(ws-print & [ws])
Prints either the active workspace, or the first argument, using the default view, which puts safety restrictions on the output to prevent overwhelming hugeness.
Prints either the active workspace, or the first argument, using the default view, which puts safety restrictions on the output to prevent overwhelming hugeness.
(ws-query & body)
Queries the trace record of the active workspace.
Queries the trace record of the active workspace.
(ws-query-print & body)
Queries the trace record of the active workspace and prints the results.
Queries the trace record of the active workspace and prints the results.
(ws-remove-all-traces!)
Disables and removes all traces in the active workspace.
Disables and removes all traces in the active workspace.
(ws-remove-trace-fn! fn-sym)
Disables and removes a trace on a function from the active workspace.
Disables and removes a trace on a function from the active workspace.
(ws-remove-trace-ns! ns-sym)
ns-sym
is a symbol that references an existing namespace. Removes all
traces applied to the namespace.
`ns-sym` is a symbol that references an existing namespace. Removes all traces applied to the namespace.
(ws-reset!)
Removes all traces set by active workspace. Resets the active workspace to nil.
Removes all traces set by active workspace. Resets the active workspace to nil.
(ws-save!)
Saves active workspace to the workspace shelf namespace in the pre-specified slot.
Saves active workspace to the workspace shelf namespace in the pre-specified slot.
(ws-save-as! slot)
Saves active workspace to the workspace shelf namespace in the specified slot
.
Saves active workspace to the workspace shelf namespace in the specified `slot`.
(ws-show-traced & [ws])
Pretty prints the map that contains the traces that are currently in place.
Pretty prints the map that contains the traces that are currently in place.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close