Ori.livneh has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/249961

Change subject: When logging perf stats, include wfWikiId() in metric key
......................................................................

When logging perf stats, include wfWikiId() in metric key

...so that modules are easily locatable in multi-wiki environments (like
Wikimedia's).

Change-Id: I60b9eb6177294eedceaacd5398545a30ad896f11
(cherry picked from commit f3558e489dfe39bb94fc84bf111d4aa4d35e8130)
---
M common/Hooks.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/61/249961/1

diff --git a/common/Hooks.php b/common/Hooks.php
index 945aad3..792e78a 100644
--- a/common/Hooks.php
+++ b/common/Hooks.php
@@ -221,7 +221,8 @@
                        $stats = RequestContext::getMain()->getStats();
                }
 
-               $stats->timing( 
"scribunto.traces.{$moduleName}__{$functionName}", $timing );
+               $metricKey = sprintf( 'scribunto.traces.%s__%s__%s', 
wfWikiId(), $moduleName, $functionName );
+               $stats->timing( $metricKey, $timing );
        }
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/249961
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: wmf/1.27.0-wmf.4
Gerrit-Owner: Ori.livneh <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to