Test Suites
Performance tests divided into suites.
Prerequisites
- Any Pillow version
- ImageMagick dev package for Wand
- OpenCV for Python, for example through opencv-python binary package
Install and run
$ cd testsuite
$ pip install -r ./requirements.txt
$ ./run.py test_suite [test_suite ...]test_suite is one of available test suites:
load, convert, composition, rotate_right, scale,
blur, wand_load, wand_convert, wand_composition,
wand_rotate_right, wand_scale, wand_blur, cv2_load,
cv2_rotate_right, cv2_scale, cv2_blur
The list can grow, please refer to:
$ ./run.py --helpCLI
$ ./run.py scale --progress
$ ./run.py scale --mode RGBA
$ ./run.py scale --runs 50
$ ./run.py scale --size 512x512For some suites the chosen mode (scale, blur) does matter,
while others (convert, composition) work regardless of current mode.
Automatic test
Automatic test launches test suites against relevant Pillow versions including SSE4 and AVX2. Currently it only works on Linux Ubuntu.
You have two ways to run the test: Vagrant or host (tested on Ubuntu 14.04 and 16.04).
Run in Vagrant
Please, ensure that you are using Vagrant version 1.8.7 or later.
$ cd auto
$ vagrant upIt will automatically start a full test which can take over 10 minutes. Run the test again:
$ vagrant provision --provision-with runRun on the host
First you need to install the prerequisites:
$ cd auto
$ sudo ./install_ubuntu.shScript options:
$ cd auto
$ ./run.sh # Run all tests
$ ./run.sh no # Skip AVX2 tests
$ ./run.sh - --json # Pass extra arguments to test suite
$ ./run.sh no --json # Pass extra arguments and skip AVX2 tests
$ CC="ccache cc" ./run.sh # Speed up subsequent builds using CC cacheSubmit results
-
Before running any tests, please ensure that you have exited all browsers on the host machine, closed all audio players and stopped any backup systems. The full test lasts up to 15 minutes.
-
Run automatic test with
--jsonoption. Please avoid custom--size,--modeand--runssettings.$ ./run.sh - --json
-
Collect the following information about your system: name, OS version, CPU. For example:
- Name: MacBook Pro (Retina, 13-inch, Late 2013)
- OS: Ubuntu 14.04.4 LTS 64bit
- CPU: Intel® Core™ i5-4258U CPU @ 2.40GHz
-
Create an issue with the collected information and test output.
Docs
The docs can be found on the public page with benchmark results and details.
Build once
$ cd docs
$ npm install
$ npm run buildServe locally & rebuild
$ python3 -m http.server &
$ npm run watch--watch-poll will help if you have any problems with auto reload.