Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/249945
Change subject: When logging perf stats, include $wgDBname in metric key
......................................................................
When logging perf stats, include $wgDBname in metric key
...so that modules are easily locatable in multi-wiki environments (like
Wikimedia's).
Change-Id: I60b9eb6177294eedceaacd5398545a30ad896f11
---
M common/Hooks.php
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto
refs/changes/45/249945/1
diff --git a/common/Hooks.php b/common/Hooks.php
index 945aad3..7afe30e 100644
--- a/common/Hooks.php
+++ b/common/Hooks.php
@@ -176,7 +176,7 @@
* @param int $timing Function execution time in milliseconds.
*/
public static function reportTiming( $moduleName, $functionName,
$timing ) {
- global $wgScribuntoGatherFunctionStats,
$wgScribuntoSlowFunctionThreshold;
+ global $wgDBname, $wgScribuntoGatherFunctionStats,
$wgScribuntoSlowFunctionThreshold;
if ( !$wgScribuntoGatherFunctionStats ) {
return;
@@ -221,7 +221,7 @@
$stats = RequestContext::getMain()->getStats();
}
- $stats->timing(
"scribunto.traces.{$moduleName}__{$functionName}", $timing );
+ $stats->timing(
"scribunto.traces.{$wgDBname}__{$moduleName}__{$functionName}", $timing );
}
/**
--
To view, visit https://gerrit.wikimedia.org/r/249945
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I60b9eb6177294eedceaacd5398545a30ad896f11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits