Run the benchmark with any difference tool you want. This guide shows how to run the benchmark via hyperfine. Make sure it is installed.
Make sure you installed odiff
, pixelmatch
and ImageMagick
(at least for this guide)
We are using hyperfine to run performance tests. Follow the installation instructions on their github. On MacOS you can do:
brew install hyperfine
Make sure that provided benchmark results were achieved on MacBook Pro 16, MacOS 11 BigSur beta.
Simple benchmark that compares 4k water image with corrupted one.
hyperfine -i 'odiff water-4k.png water-4k-2.png water-diff.png' 'pixelmatch water-4k.png water-4k-2.png water-diff.png' 'compare water-4k.png water-4k-2.png -compose src water-diff.png'
This generates markdown output that is displayed in README.
hyperfine -i --export-markdown <PATH_TO_MARKDOWN> 'pixelmatch www.cypress.io-1.png www.cypress.io.png www.cypress-diff.png' 'compare www.cypress.io-1.png www.cypress.io.png -compose src diff-magick.png' 'ODiffBin www.cypress.io-1.png www.cypress.io.png www.cypress-diff.png'