Help:Configuration parameter "$smwgQueryProfiler"

From semantic-mediawiki.org
Jump to: navigation, search
edit with form (experimental)


Title $smwgQueryProfiler
Description Sets whether specific monitorable profile data are recorded
Default setting See below
Software Semantic MediaWiki
First version supported 1.9.0
Last version supported still available
Configuration Installation
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 setting was introduced in Semantic MediaWiki 1.9.0.1 Starting with Semantic MediaWiki 2.5.0 an additional option to record query parameters is available.2

Default setting

$smwgQueryProfiler = array(
	'smwgQueryDurationEnabled' => false,
	'smwgQueryParametersEnabled' => false,
);

Available options

  • smwgQueryDurationEnabled - Allows recording the query duration (the time between the query result selection and its output), since Semantic MediaWiki 1.9.0
  • smwgQueryParametersEnabled - 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.0

Changing the default setting

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

Enable the query duration to be recorded
$smwgQueryProfiler = array(
	'smwgQueryDurationEnabled' => true,
	'smwgQueryParametersEnabled' => false
);
NoteNote: If you enable additional query profiling, please ensure to run maintenance script "setupStore.php" followed by maintenance script "rebuildData.php".


Enable the query parameters to be recorded
$smwgQueryProfiler = array(
	'smwgQueryDurationEnabled' => false,
	'smwgQueryParametersEnabled' => true
);
NoteNote: If you enable additional query profiling, please ensure to run maintenance script "setupStore.php" followed by maintenance script "rebuildData.php".


Enable the query duration and query parameters to be recorded
$smwgQueryProfiler = array(
	'smwgQueryDurationEnabled' => true,
	'smwgQueryParametersEnabled' => true
);
NoteNote: If you enable additional query profiling, please ensure to run maintenance script "setupStore.php" followed by maintenance script "rebuildData.php".


Disable all query profiling including size, depth, format and string
$smwgQueryProfiler = false;
Important noteImportant Note: This is not recommended since the disabled functionality may impact secondary processes that rely on profile information to be available (notification system etc.).

See also