Chad has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/194743

Change subject: Profile command line scripts the new way
......................................................................

Profile command line scripts the new way

Change-Id: I166e040b41439886e182809208ad0da0a4a63573
---
M WebVideoTranscode/WebVideoTranscodeJob.php
1 file changed, 3 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/43/194743/1

diff --git a/WebVideoTranscode/WebVideoTranscodeJob.php 
b/WebVideoTranscode/WebVideoTranscodeJob.php
index 1bd3cb1..2368d87 100644
--- a/WebVideoTranscode/WebVideoTranscodeJob.php
+++ b/WebVideoTranscode/WebVideoTranscodeJob.php
@@ -382,10 +382,8 @@
                $this->output( "Running cmd: \n\n" .$cmd . "\n" );
 
                // Right before we output remove the old file
-               wfProfileIn( 'ffmpeg_encode' );
                $retval = 0;
                $shellOutput = $this->runShellExec( $cmd, $retval );
-               wfProfileOut( 'ffmpeg_encode' );
 
                if( $retval != 0 ){
                        return $cmd .
@@ -668,10 +666,8 @@
 
                $this->output( "Running cmd: \n\n" .$cmd . "\n" );
 
-               wfProfileIn( 'ffmpeg2theora_encode' );
                $retval = 0;
                $shellOutput = $this->runShellExec( $cmd, $retval );
-               wfProfileOut( 'ffmpeg2theora_encode' );
 
                // ffmpeg2theora returns 0 status on some errors, so also check 
for file
                if( $retval != 0 || !is_file( $outputFile ) || filesize( 
$outputFile ) === 0 ){
@@ -691,7 +687,7 @@
         * @param $retval String, refrence variable to return the exit code
         * @return string
         */
-       public function runShellExec( $cmd, &$retval){
+       public function runShellExec( $cmd, &$retval ){
                global $wgTranscodeBackgroundTimeLimit,
                        $wgTranscodeBackgroundMemoryLimit,
                        $wgTranscodeBackgroundSizeLimit,
@@ -704,7 +700,8 @@
                                "memory" => $wgTranscodeBackgroundMemoryLimit,
                                "time" => $wgTranscodeBackgroundTimeLimit
                        );
-                       return wfShellExec( $cmd . ' 2>&1', $retval , array(), 
$limits );
+                       return wfShellExec( $cmd . ' 2>&1', $retval , array(), 
$limits,
+                               array( 'profileMethod' => wfGetCaller() ) );
                }
 
                $encodingLog = $this->getTargetEncodePath() . '.stdout.log';

-- 
To view, visit https://gerrit.wikimedia.org/r/194743
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I166e040b41439886e182809208ad0da0a4a63573
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: Chad <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to