"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "maintenance/fileOpPerfTest.php" between
mediawiki-1.31.1.tar.gz and mediawiki-1.32.0.tar.gz

About: MediaWiki is a wiki engine (the collaborative editing software that runs for e.g. Wikipedia, the free encyclopedia).

fileOpPerfTest.php  (mediawiki-1.31.1):fileOpPerfTest.php  (mediawiki-1.32.0)
skipping to change at line 32 skipping to change at line 32
*/ */
error_reporting( E_ALL ); error_reporting( E_ALL );
require_once __DIR__ . '/Maintenance.php'; require_once __DIR__ . '/Maintenance.php';
/** /**
* Maintenance script to test fileop performance. * Maintenance script to test fileop performance.
* *
* @ingroup Maintenance * @ingroup Maintenance
*/ */
class TestFileOpPerformance extends Maintenance { class FileOpPerfTest extends Maintenance {
public function __construct() { public function __construct() {
parent::__construct(); parent::__construct();
$this->addDescription( 'Test fileop performance' ); $this->addDescription( 'Test fileop performance' );
$this->addOption( 'b1', 'Backend 1', true, true ); $this->addOption( 'b1', 'Backend 1', true, true );
$this->addOption( 'b2', 'Backend 2', false, true ); $this->addOption( 'b2', 'Backend 2', false, true );
$this->addOption( 'srcdir', 'File source directory', true, true ) ; $this->addOption( 'srcdir', 'File source directory', true, true ) ;
$this->addOption( 'maxfiles', 'Max files', false, true ); $this->addOption( 'maxfiles', 'Max files', false, true );
$this->addOption( 'quick', 'Avoid operation pre-checks (use doQui ckOperations())' ); $this->addOption( 'quick', 'Avoid operation pre-checks (use doQui ckOperations())' );
$this->addOption( 'parallelize', '"parallelize" flag for doOperat ions()', false, true ); $this->addOption( 'parallelize', '"parallelize" flag for doOperat ions()', false, true );
} }
skipping to change at line 144 skipping to change at line 144
$backend->$method( $ops5, $opts ); $backend->$method( $ops5, $opts );
$e = ( microtime( true ) - $start ) * 1000; $e = ( microtime( true ) - $start ) * 1000;
if ( $status->getErrorsArray() ) { if ( $status->getErrorsArray() ) {
print_r( $status->getErrorsArray() ); print_r( $status->getErrorsArray() );
exit( 0 ); exit( 0 );
} }
$this->output( $backend->getName() . ": Deleted " . count( $ops5 ) . " files in $e ms.\n" ); $this->output( $backend->getName() . ": Deleted " . count( $ops5 ) . " files in $e ms.\n" );
} }
} }
$maintClass = TestFileOpPerformance::class; $maintClass = FileOpPerfTest::class;
require_once RUN_MAINTENANCE_IF_MAIN; require_once RUN_MAINTENANCE_IF_MAIN;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)