Krinkle has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/391987 )
Change subject: labs: Enable profiler based on same signals as production does
......................................................................
labs: Enable profiler based on same signals as production does
Bug: T180766
Change-Id: I8179ed9ed3c7f0bc0ee951d2055514e00467d6d8
---
M wmf-config/CommonSettings-labs.php
1 file changed, 9 insertions(+), 2 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/87/391987/1
diff --git a/wmf-config/CommonSettings-labs.php
b/wmf-config/CommonSettings-labs.php
index 5296b05..75fbf66 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -18,8 +18,15 @@
#
if ( $wmfRealm == 'labs' ) { # safe guard
-// test wiki
-if ( $wgDBname == 'testwiki' ) {
+
+// Profiler (similar to wmf-config/profiler.php for production)
+// 1. Web request for https://test.wikimedia.beta.wmflabs.org/
+// 2. Web request with X-Wikimedia-Debug and ?forceprofile=1
+// 3. Maintenance script with --profiler=text
+if ( $wgDBname == 'testwiki'
+ || PHP_SAPI === 'cli'
+ || ( isset( $_GET['forceprofile'] ) && isset(
$_SERVER['HTTP_X_WIKIMEDIA_DEBUG'] ) )
+) {
$wgProfiler = [
'class' => 'ProfilerXhprof',
'output' => 'text',
--
To view, visit https://gerrit.wikimedia.org/r/391987
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8179ed9ed3c7f0bc0ee951d2055514e00467d6d8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits