From: Aaron Schulz Date: Mon, 3 Feb 2014 20:11:59 +0000 (-0800) Subject: Use ProfileSection in FileOpBatch X-Git-Tag: 1.31.0-rc.0~17038^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%7B%7B%20url_for%28%27admin_users%27%29%20%7D%7D?a=commitdiff_plain;h=a9424c3c3e2cef773b6e8c4202c1b79f5d74ede6;p=lhc%2Fweb%2Fwiklou.git Use ProfileSection in FileOpBatch Change-Id: I5453130f89a2b46a18dc6ecfb23b2f75c6c2f16f --- diff --git a/includes/filebackend/FileOpBatch.php b/includes/filebackend/FileOpBatch.php index 32b65baba1..9fd1eb5a76 100644 --- a/includes/filebackend/FileOpBatch.php +++ b/includes/filebackend/FileOpBatch.php @@ -55,14 +55,12 @@ class FileOpBatch { * @return Status */ public static function attempt( array $performOps, array $opts, FileJournal $journal ) { - wfProfileIn( __METHOD__ ); + $section = new ProfileSection( __METHOD__ ); $status = Status::newGood(); $n = count( $performOps ); if ( $n > self::MAX_BATCH_SIZE ) { $status->fatal( 'backend-fail-batchsize', $n, self::MAX_BATCH_SIZE ); - wfProfileOut( __METHOD__ ); - return $status; } @@ -108,8 +106,6 @@ class FileOpBatch { $status->success[$index] = false; ++$status->failCount; if ( !$ignoreErrors ) { - wfProfileOut( __METHOD__ ); - return $status; // abort } } @@ -123,8 +119,6 @@ class FileOpBatch { if ( count( $entries ) ) { $subStatus = $journal->logChangeBatch( $entries, $batchId ); if ( !$subStatus->isOK() ) { - wfProfileOut( __METHOD__ ); - return $subStatus; // abort } } @@ -136,8 +130,6 @@ class FileOpBatch { // Attempt each operation (in parallel if allowed and possible)... self::runParallelBatches( $pPerformOps, $status ); - wfProfileOut( __METHOD__ ); - return $status; }