From a9424c3c3e2cef773b6e8c4202c1b79f5d74ede6 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Mon, 3 Feb 2014 12:11:59 -0800 Subject: [PATCH] Use ProfileSection in FileOpBatch Change-Id: I5453130f89a2b46a18dc6ecfb23b2f75c6c2f16f --- includes/filebackend/FileOpBatch.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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; } -- 2.20.1