|Found errors or typos? Just edit the page or leave a message on the talk page.|
The English language documentation is canonical and most up to date.
Configuration parameter "$smwgQueryProfiler"
|Configuration parameter details:|
|Description||Sets whether specific monitorable profile data are recorded|
|Until version||still available|
|Keyword||monitoring · profiling|
$smwgQueryProfiler is a configuration parameter that sets whether specific monitorable profile data for queries such as query duration and query parameters are recorded or not. The configuration parameter was introduced in Semantic MediaWiki 1.9.0Released on 3 January 2014 and compatible with MW 1.19.0 - 1.22.x..1 Starting with Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x. an additional option to record query parameters is available.2
$smwgQueryProfiler = true;
SMW_QPRFL_DUR- Allows recording the query duration (the time between the query result selection and its output) / since Semantic MediaWiki 1.9.0Released on 3 January 2014 and compatible with MW 1.19.0 - 1.22.x.
SMW_QPRFL_PARAMS- Allows recording the query parameters (the parameters like limits and sorting influencing on how and which results are selected for the output) / since Semantic MediaWiki 2.5.0Released on 14 March 2017 and compatible with MW 1.23.0 - 1.29.x.
Changing the default setting
To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the
- Enable the recording of query duration
$smwgQueryProfiler = SMW_QPRFL_DUR;
- Enable the recording of query parameters
$smwgQueryProfiler = SMW_QPRFL_PARAMS;
- Enable the recording of query duration and query parameters
$smwgQueryProfiler = SMW_QPRFL_DUR | SMW_QPRFL_PARAMS;
- Disable all query profiling from being recorded
$smwgQueryProfiler = false;
- Help page on query profiling
- Help page on Querying for queries
- Help page on special property "Query size"Holds the value of the number of conditions in a query
- Help page on special property "Query depth"Holds the value of the property depth of a query
- Help page on special property "Query format"Holds the name of the result format used in a query
- Help page on special property "Query string"Holds the conditions of the query as a string
- Help page on special property "Query duration"Holds the value of the duration a query took to execute
- Help page on special property "Query parameters"Holds the parameters a query used to select its output
- Help page on special property "Query scode"Holds the status code a query uses to define its internal state