Aaron Schulz has submitted this change and it was merged.
Change subject: Revert "Enabled 1:1 profiling for cli scripts and put "cli" in
the profile ID."
......................................................................
Revert "Enabled 1:1 profiling for cli scripts and put "cli" in the profile ID."
This confounds all of the graphite graphs.
It might also be better to switch on $wgAggregateStatsID.
This reverts commit 5335098385a6cb1a75451f8c6aa61d163978cf6e
Change-Id: Ia518c06b322c085bbb4854628595e1afb58943ad
---
M wmf-config/StartProfiler.php
1 file changed, 8 insertions(+), 4 deletions(-)
Approvals:
Aaron Schulz: Verified; Looks good to me, approved
diff --git a/wmf-config/StartProfiler.php b/wmf-config/StartProfiler.php
index 6e16fe0..23c88ca 100644
--- a/wmf-config/StartProfiler.php
+++ b/wmf-config/StartProfiler.php
@@ -17,18 +17,22 @@
$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 ( ( 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'
$version = str_replace( 'php-', '', basename( $IP ) );
- if ( PHP_SAPI == 'cli' ) {
- $wgProfiler->setProfileID( "cli-$version" );
- } elseif ( strpos( @$_SERVER['REQUEST_URI'], '/w/thumb.php' ) !== false
) {
+ if ( strpos( @$_SERVER['REQUEST_URI'], '/w/thumb.php' ) !== false ) {
$wgProfiler->setProfileID( "thumb-$version" );
} else {
$wgProfiler->setProfileID( $version );
}
+ /*
+ if ( PHP_SAPI == 'cli' ) {
+ $wgProfiler->setProfileID( 'cli' );
+ } else {
+ $wgProfiler->setProfileID( 'all' );
+ }*/
# $wgProfiler->setMinimum(5 /* seconds */);
# WTF is this for?
} elseif ( defined( 'MW_FORCE_PROFILE' ) ) {
--
To view, visit https://gerrit.wikimedia.org/r/59982
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia518c06b322c085bbb4854628595e1afb58943ad
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz <[email protected]>
Gerrit-Reviewer: Aaron Schulz <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits