Chad has uploaded a new change for review.

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

Change subject: Properly profile fsockopen() call in 
PoolCounter_ConnectionManager
......................................................................

Properly profile fsockopen() call in PoolCounter_ConnectionManager

Change-Id: If30693147ec8c75a3896d5324e98be4c4201aa3c
---
M PoolCounterClient_body.php
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PoolCounter 
refs/changes/59/197359/1

diff --git a/PoolCounterClient_body.php b/PoolCounterClient_body.php
index 73f6220..aebf82a 100644
--- a/PoolCounterClient_body.php
+++ b/PoolCounterClient_body.php
@@ -33,11 +33,9 @@
                        if ( count( $parts ) < 2 ) {
                                $parts[] = 7531;
                        }
-                       wfProfileIn( __METHOD__.'-connect' );
                        wfSuppressWarnings();
-                       $conn = fsockopen( $parts[0], $parts[1], $errno, 
$errstr, $this->timeout );
+                       $conn = $this->open( $parts[0], $parts[1], $errno, 
$errstr );
                        wfRestoreWarnings();
-                       wfProfileOut( __METHOD__.'-connect' );
                        if ( $conn ) {
                                break;
                        }
@@ -52,6 +50,13 @@
        }
 
        /**
+        * Open a socket. Just a wrapper for fsockopen()
+        */
+       private function open( $host, $port, &$errno, &$errstr ) {
+               return fsockopen( $host, $port, $errno, $errstr, $this->timeout 
);
+       }
+
+       /**
         * @param $conn
         */
        function close( $conn ) {

-- 
To view, visit https://gerrit.wikimedia.org/r/197359
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If30693147ec8c75a3896d5324e98be4c4201aa3c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PoolCounter
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

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

Reply via email to