if ( !isset( $this->fsFile ) ) {
$starttime = microtime( true );
$this->fsFile = $this->repo->getLocalReference( $this->getPath() );
- RequestContext::getMain()->getStats()->timing( 'media.thumbnail.generate.fetchoriginal', microtime( true ) - $starttime );
+
+ $statTiming = microtime( true ) - $starttime;
+ RequestContext::getMain()->getStats()->timing(
+ 'media.thumbnail.generate.fetchoriginal', 1000 * $statTiming );
if ( !$this->fsFile ) {
$this->fsFile = false; // null => false; cache negative hits
$thumb = $handler->doTransform( $this, $tmpThumbPath, $thumbUrl, $transformParams );
$tmpFile->bind( $thumb ); // keep alive with $thumb
- $stats->timing( 'media.thumbnail.generate.transform', microtime( true ) - $starttime );
+ $statTiming = microtime( true ) - $starttime;
+ $stats->timing( 'media.thumbnail.generate.transform', 1000 * $statTiming );
if ( !$thumb ) { // bad params?
$thumb = false;
$thumb = $this->transformErrorOutput( $thumbPath, $thumbUrl, $transformParams, $flags );
}
- $stats->timing( 'media.thumbnail.generate.store', microtime( true ) - $starttime );
+ $statTiming = microtime( true ) - $starttime;
+ $stats->timing( 'media.thumbnail.generate.store', 1000 * $statTiming );
// Give extensions a chance to do something with this thumbnail...
Hooks::run( 'FileTransformed', array( $this, $thumb, $tmpThumbPath, $thumbPath ) );
$params = $this->getHandler()->sanitizeParamsForBucketing( $params );
- $bucketName = $this->getBucketThumbName( $bucket );
-
$tmpFile = $this->makeTransformTmpFile( $bucketPath );
if ( !$tmpFile ) {
// this object exists
$tmpFile->bind( $this );
- RequestContext::getMain()->getStats()->timing( 'media.thumbnail.generate.bucket', $buckettime );
+ RequestContext::getMain()->getStats()->timing(
+ 'media.thumbnail.generate.bucket', 1000 * $buckettime );
return true;
}
if ( $readyTs ) {
// Record time to run for the job type
$pickupDelay = $popTime - $readyTs;
- $stats->timing( 'jobqueue.pickup_delay.all', $pickupDelay );
- $stats->timing( "jobqueue.pickup_delay.$jType", $pickupDelay );
+ $stats->timing( 'jobqueue.pickup_delay.all', 1000 * $pickupDelay );
+ $stats->timing( "jobqueue.pickup_delay.$jType", 1000 * $pickupDelay );
}
// Mark the job as done on success or when the job cannot be retried
$data = self::getCache()->get( self::getKey( $id ) );
$real = microtime( true ) - $stime;
- RequestContext::getMain()->getStats()->timing( "session.read", $real );
+ RequestContext::getMain()->getStats()->timing( "session.read", 1000 * $real );
self::$hashCache = array( $id => self::getHash( $data ) );
self::getCache()->set( self::getKey( $id ), $data, $wgObjectCacheSessionExpiry );
$real = microtime( true ) - $stime;
- RequestContext::getMain()->getStats()->timing( "session.write", $real );
+ RequestContext::getMain()->getStats()->timing( "session.write", 1000 * $real );
}
return true;
self::getCache()->delete( self::getKey( $id ) );
$real = microtime( true ) - $stime;
- RequestContext::getMain()->getStats()->timing( "session.destroy", $real );
+ RequestContext::getMain()->getStats()->timing( "session.destroy", 1000 * $real );
return true;
}
$result = self::applyFilter( $filter, $data, $this->config );
- $stats->timing( "resourceloader_cache.$filter.miss", microtime( true ) - $statStart );
+ $statTiming = microtime( true ) - $statStart;
+ $stats->timing( "resourceloader_cache.$filter.miss", 1000 * $statTiming );
if ( $options['cacheReport'] ) {
$result .= "\n/* cache key: $key */";
}
$statTiming = microtime( true ) - $statStart;
$statName = strtr( $this->getName(), '.', '_' );
- $stats->timing( "resourceloader_build.all", $statTiming );
- $stats->timing( "resourceloader_build.$statName", $statTiming );
+ $stats->timing( "resourceloader_build.all", 1000 * $statTiming );
+ $stats->timing( "resourceloader_build.$statName", 1000 * $statTiming );
return $content;
}