}
$bench_number++;
- $start = wfTime();
+ $start = microtime( true );
for( $i=0; $i<$count; $i++ ) {
call_user_func_array( $bench['function'], $bench['args'] );
}
- $delta = wfTime() - $start;
+ $delta = microtime( true ) - $start;
// function passed as a callback
if( is_array( $bench['function'] ) ) {
$this->insertData( $dbw );
- $start = wfTime();
+ $start = microtime( true );
$this->delete( $dbw );
- $end = wfTime();
+ $end = microtime( true );
echo "Delete: " . $end - $start;
echo "\r\n";
$this->insertData( $dbw );
- $start = wfTime();
+ $start = microtime( true );
$this->truncate( $dbw );
- $end = wfTime();
+ $end = microtime( true );
echo "Truncate: " . $end - $start;
echo "\r\n";
* @return string
*/
private function benchHooks( $trials = 10 ) {
- $start = wfTime();
+ $start = microtime( true );
for ( $i = 0; $i < $trials; $i++ ) {
wfRunHooks( 'Test' );
}
- $delta = wfTime() - $start;
+ $delta = microtime( true ) - $start;
$pertrial = $delta / $trials;
return sprintf( "Took %6.2fs",
$pertrial );
* @return string
*/
private function benchSquid( $urls, $trials = 1 ) {
- $start = wfTime();
+ $start = microtime( true );
for ( $i = 0; $i < $trials; $i++ ) {
SquidUpdate::purge( $urls );
}
- $delta = wfTime() - $start;
+ $delta = microtime( true ) - $start;
$pertrial = $delta / $trials;
$pertitle = $pertrial / count( $urls );
return sprintf( "%4d titles in %6.2fms (%6.2fms each)",
$dumper->stderr = $stderr;
// The actual dump and taking time
- $ts_before = wfTime();
+ $ts_before = microtime( true );
$dumper->dump( WikiExporter::FULL, WikiExporter::TEXT );
- $ts_after = wfTime();
+ $ts_after = microtime( true );
$lastDuration = $ts_after - $ts_before;
// Handling increasing the iteration count for the stubs