Support for tracing state changes in a Clara session.
Returns the trace from the given session.
Returns true if the given session has tracing enabled, false otherwise.
Given a session with tracing enabled, return a map of rule and query names to a numerical index that represents an approximation of the proportional amount of times Clara performed processing related to this rule. This is not intended to have a precise meaning, and is intended solely as a means to provide a rough guide to which rules and queries should be considered the first suspects when diagnosing performance problems in rules sessions. It is possible for a relatively small number of interactions to take a long time if those interactions are particularly costly. It is expected that the results may change between different versions when Clara’s internals change, for example to optimize the rules network. Nevertheless, it is anticipated that this will provide useful information for a first pass at rules performance problem debugging. This should not be used to drive user logic.
This currently returns a Clojure array map in order to conveniently have the rules with the most interactions printed first in the string representation of the map.
Creates a persistent tracing event listener
Returns a new session identical to the given one, but with tracing enabled. The given session is returned unmodified if tracing is already enabled.
Returns a new session identical to the given one, but with tracing disabled The given session is returned unmodified if tracing is already disabled.