Asher has submitted this change and it was merged.
Change subject: only randomly profile http requests if $wmfDatacenter == 'eqiad'
......................................................................
only randomly profile http requests if $wmfDatacenter == 'eqiad'
Change-Id: Ie9d19c8f36156296f45e38319c689a4ba6539a4c
---
M wmf-config/StartProfiler.php
1 file changed, 1 insertion(+), 1 deletion(-)
Approvals:
Aaron Schulz: Looks good to me, but someone else must approve
Asher: Verified; Looks good to me, approved
jenkins-bot: Verified
diff --git a/wmf-config/StartProfiler.php b/wmf-config/StartProfiler.php
index b249385..0d5e0ac 100644
--- a/wmf-config/StartProfiler.php
+++ b/wmf-config/StartProfiler.php
@@ -17,7 +17,7 @@
$wgProfiler = new ProfilerSimpleUDP( array() );
$wgProfiler->setProfileID( 'test2' );
# Normal case: randomly selected for logged profiling sample
-} elseif ( PHP_SAPI !== 'cli' && ( mt_rand( 0, 0x7fffffff ) % 50 ) == 0 ) {
+} elseif ( PHP_SAPI !== 'cli' && $wmfDatacenter == 'eqiad' && ( mt_rand( 0,
0x7fffffff ) % 50 ) == 0 ) {
require_once( $IP . '/includes/profiler/ProfilerSimpleUDP.php' );
$wgProfiler = new ProfilerSimpleUDP( array() );
// $IP is something like '/usr/local/apache/common-local/php-1.19'
--
To view, visit https://gerrit.wikimedia.org/r/75146
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9d19c8f36156296f45e38319c689a4ba6539a4c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Asher <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Asher <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits