Merge "Several tweaks to the install.php script"
[lhc/web/wiklou.git] / includes / profiler / Profiler.php
index b709498..f6bafd5 100644 (file)
@@ -101,8 +101,10 @@ abstract class Profiler {
        /** @var TransactionProfiler */
        protected $trxProfiler;
 
-       /** @var Profiler */
-       public static $__instance = null; // do not call this outside Profiler and ProfileSection
+       // @codingStandardsIgnoreStart PSR2.Classes.PropertyDeclaration.Underscore
+       /** @var Profiler Do not call this outside Profiler and ProfileSection */
+       public static $__instance = null;
+       // @codingStandardsIgnoreEnd
 
        /**
         * @param array $params
@@ -205,9 +207,10 @@ abstract class Profiler {
         *
         * @param string $server DB server
         * @param string $db DB name
+        * @param string $id Resource ID string of connection
         */
-       public function transactionWritingIn( $server, $db ) {
-               $this->trxProfiler->transactionWritingIn( $server, $db );
+       public function transactionWritingIn( $server, $db, $id = '' ) {
+               $this->trxProfiler->transactionWritingIn( $server, $db, $id );
        }
 
        /**
@@ -219,9 +222,10 @@ abstract class Profiler {
         *
         * @param string $server DB server
         * @param string $db DB name
+        * @param string $id Resource ID string of connection
         */
-       public function transactionWritingOut( $server, $db ) {
-               $this->trxProfiler->transactionWritingOut( $server, $db );
+       public function transactionWritingOut( $server, $db, $id = '' ) {
+               $this->trxProfiler->transactionWritingOut( $server, $db, $id );
        }
 
        /**
@@ -366,9 +370,10 @@ class TransactionProfiler {
         *
         * @param string $server DB server
         * @param string $db DB name
+        * @param string $id Resource ID string of connection
         */
-       public function transactionWritingIn( $server, $db ) {
-               $name = "{$server} ({$db})";
+       public function transactionWritingIn( $server, $db, $id ) {
+               $name = "{$server} ({$db}) ($id)";
                if ( isset( $this->mDBTrxHoldingLocks[$name] ) ) {
                        ++$this->mDBTrxHoldingLocks[$name]['refs'];
                } else {
@@ -412,9 +417,10 @@ class TransactionProfiler {
         *
         * @param string $server DB server
         * @param string $db DB name
+        * @param string $id Resource ID string of connection
         */
-       public function transactionWritingOut( $server, $db ) {
-               $name = "{$server} ({$db})";
+       public function transactionWritingOut( $server, $db, $id ) {
+               $name = "{$server} ({$db}) ($id)";
                if ( --$this->mDBTrxHoldingLocks[$name]['refs'] <= 0 ) {
                        $slow = false;
                        foreach ( $this->mDBTrxMethodTimes[$name] as $info ) {