Manual:fileOpPerfTest.php
Appearance
MediaWiki version: | ≥ 1.20 |
MediaWiki file: fileOpPerfTest.php | |
---|---|
Location: | maintenance/ |
Source code: | master • 1.43.0 • 1.42.4 • 1.39.11 |
Classes: | TestFileOpPerformance |
Details
[edit]fileOpPerfTest.php file is a maintenance script to test fileop performance. This script includes files operation tests such as storing, copying, moving, and deleting.
Options/Arguments
[edit]Option | Description | Required? |
---|---|---|
--b1 | Backend 1 | Required |
--b2 | Backend 2 | Optional |
--srcdir | File source directory | Required |
--maxfiles | Max files | Optional |
--quick | Avoid operation pre-checks (use doQuickOperations()) | Optional |
--parallelize | "parallelize" flag for doOperations() | Optional |
Usage
[edit]php maintenance/run.php fileOpPerfTest --b1 backendFirst --srcdir sourceDirectory [ --b2| --maxfiles| --quick| --parallelize ]
Terminal
$ php maintenance/run.php fileOpPerfTest --b1 local-backend --b2 AmazonS3 --srcdir images Using 'images/cache' in operations. Using 'images/archive' in operations. Using 'images/thumb' in operations. Using 'images/lockdir' in operations. Using 'images/8' in operations. Using 'images/README' in operations. Using 'images/d' in operations. Using 'images/e' in operations. Using 'images/5' in operations. local-backend: Stored 3 files in 1.51705741 ms. local-backend: Copied 3 files in 1.60479545 ms. local-backend: Moved 3 files in 4.22000885 ms. local-backend: Deleted 3 files in 3.39102745 ms.
In MediaWiki version 1.39.10 and earlier, you must invoke maintenance scripts using
php maintenance/scriptName.php
instead of php maintenance/run.php scriptName
.