From: Aaron Schulz Date: Sun, 20 May 2012 19:44:38 +0000 (-0700) Subject: [FileBackend] Added some Swift listing profiling. X-Git-Tag: 1.31.0-rc.0~23557^2 X-Git-Url: https://git.cyclocoop.org/%20%27.%28%24debut%20%20%20%24par_page%29.%27?a=commitdiff_plain;h=a350d68e093ee50ad1e86b24a8afb776d722cab7;p=lhc%2Fweb%2Fwiklou.git [FileBackend] Added some Swift listing profiling. Change-Id: I61d1ec5725be2ebed4bb08e713dfcab7e85160fc --- diff --git a/includes/filerepo/backend/SwiftFileBackend.php b/includes/filerepo/backend/SwiftFileBackend.php index 12fc801308..252081336f 100644 --- a/includes/filerepo/backend/SwiftFileBackend.php +++ b/includes/filerepo/backend/SwiftFileBackend.php @@ -741,8 +741,9 @@ class SwiftFileBackend extends FileBackendStore { * @return Array List of relative paths of dirs directly under $dir */ public function getDirListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) { - $dirs = array(); + wfProfileIn( __METHOD__ . '-' . $this->name ); + $dirs = array(); try { $container = $this->getContainer( $fullCont ); $prefix = ( $dir == '' ) ? null : "{$dir}/"; @@ -788,6 +789,7 @@ class SwiftFileBackend extends FileBackendStore { array( 'cont' => $fullCont, 'dir' => $dir ) ); } + wfProfileOut( __METHOD__ . '-' . $this->name ); return $dirs; } @@ -806,8 +808,9 @@ class SwiftFileBackend extends FileBackendStore { * @return Array List of relative paths of files under $dir */ public function getFileListPageInternal( $fullCont, $dir, &$after, $limit, array $params ) { - $files = array(); + wfProfileIn( __METHOD__ . '-' . $this->name ); + $files = array(); try { $container = $this->getContainer( $fullCont ); $prefix = ( $dir == '' ) ? null : "{$dir}/"; @@ -831,6 +834,7 @@ class SwiftFileBackend extends FileBackendStore { array( 'cont' => $fullCont, 'dir' => $dir ) ); } + wfProfileOut( __METHOD__ . '-' . $this->name ); return $files; }