From: Aaron Schulz Date: Sat, 25 Feb 2012 01:43:20 +0000 (+0000) Subject: More file streaming related profiling X-Git-Tag: 1.31.0-rc.0~24523 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22auteur_infos%22%2C%20%22id_auteur=%24id%22%29%20.%20%22?a=commitdiff_plain;h=8b150294824a6921462583fac144cb8ec88a1c07;p=lhc%2Fweb%2Fwiklou.git More file streaming related profiling --- diff --git a/includes/StreamFile.php b/includes/StreamFile.php index 1b4b6aaf0b..dd527b2988 100644 --- a/includes/StreamFile.php +++ b/includes/StreamFile.php @@ -29,7 +29,9 @@ class StreamFile { if ( $res == self::NOT_MODIFIED ) { $ok = true; // use client cache } elseif ( $res == self::READY_STREAM ) { + wfProfileIn( __METHOD__ . '-send' ); $ok = readfile( $fname ); + wfProfileOut( __METHOD__ . '-send' ); } else { $ok = false; // failed } diff --git a/includes/filerepo/backend/FileBackend.php b/includes/filerepo/backend/FileBackend.php index 4c37ead4b7..2b733cd2b8 100644 --- a/includes/filerepo/backend/FileBackend.php +++ b/includes/filerepo/backend/FileBackend.php @@ -1267,7 +1267,9 @@ abstract class FileBackendStore extends FileBackend { if ( $res == StreamFile::NOT_MODIFIED ) { // do nothing; client cache is up to date } elseif ( $res == StreamFile::READY_STREAM ) { + wfProfileIn( __METHOD__ . '-send' ); $status = $this->doStreamFile( $params ); + wfProfileOut( __METHOD__ . '-send' ); } else { $status->fatal( 'backend-fail-stream', $params['src'] ); }