The SPIN Statistics View can be used to measure the performance of individual queries when they are executed as SPIN Inferences or SPIN Constraint Checks (via the Problems View). The view will also record invocations of queries in SWP modules and, optionally, any SPIN function almost anywhere in the system (including SPARQLMotion scripts). Whenever the view has been made visible (Window > Show View > SPIN Statistics) then the SPIN engines will collect performance statistics that measure the duration of each individual query. When done, these will be added to the list of already shown statistics entries in the SPIN Statistics view.
There are buttons to group the results by context (class) or by query, and the duration will then be the accumulated result across multiple executions.
The tool tip text of each row will show the details of the underlying SPARQL query. A double-click on a row will navigate to the context class.
There is an option to also record SPARQL function calls - split into native SPARQL functions (those implemented in Java as part of the TopBraid platform, e.g. the spif: and smf: namespaces), and SPIN functions with a SPARQL query as body. Note that depending on your queries this may produce very many results and therefore make the result display less responsive. If used with care, this option will provide very detailed insights and reveal those functions that need fine tuning.
In TBC-ME, there is also a button to record the duration of every single SWP element call. See SWP Help for details.