BryanDavis has uploaded a new change for review.
https://gerrit.wikimedia.org/r/179539
Change subject: Fix StartProfiler undef variable warning
......................................................................
Fix StartProfiler undef variable warning
Change-Id: I3dd4f45835ff3299d79ca33dd5dbe98cb2435f45
---
M wmf-config/StartProfiler.php
1 file changed, 6 insertions(+), 6 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config
refs/changes/39/179539/1
diff --git a/wmf-config/StartProfiler.php b/wmf-config/StartProfiler.php
index e59c095..9958e81 100644
--- a/wmf-config/StartProfiler.php
+++ b/wmf-config/StartProfiler.php
@@ -95,8 +95,10 @@
if ( empty( $data ) ) {
return;
}
+
// Collate stack samples and fold into single lines.
// This is the format expected by FlameGraph.
+ $stacks = array();
foreach ( $data as $sample ) {
$stack = array();
foreach( $sample['phpStack'] as $frame ) {
@@ -113,12 +115,10 @@
$options = array( 'serializer' => 'none' );
$pool = RedisConnectionPool::singleton( $options );
$conn = $pool->getConnection( 'fluorine.eqiad.wmnet:6379' );
- if ( !$conn ) {
- return;
- }
-
- foreach ( $stacks as $stack => $count ) {
- $conn->publish( 'xenon', "$stack $count" );
+ if ( $conn ) {
+ foreach ( $stacks as $stack => $count ) {
+ $conn->publish( 'xenon', "$stack $count" );
+ }
}
} );
}
--
To view, visit https://gerrit.wikimedia.org/r/179539
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3dd4f45835ff3299d79ca33dd5dbe98cb2435f45
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits