Skip to content

Commit

Permalink
Fix display of benchmarks in README (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro authored Feb 4, 2019
1 parent 6430166 commit b18414b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ Oxipng is open-source software, distributed under the MIT license.
Tested oxipng 2.2.0 (compiled on rustc 1.32.0 (9fda7c223 2019-01-16)) against OptiPNG version 0.7.7 on Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz with 8 logical cores



```
Benchmark #1: ./target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png
Time (mean ± σ): 117.2 ms ± 5.6 ms [User: 269.2 ms, System: 17.2 ms]
Range (min … max): 106.6 ms … 126.0 ms 25 runs
Expand All @@ -109,6 +109,8 @@ Benchmark #2: optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png
Summary
'./target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran
2.39 ± 0.12 times faster than 'optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png'
Benchmark #1: ./target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png
Time (mean ± σ): 144.7 ms ± 6.3 ms [User: 497.5 ms, System: 25.5 ms]
Range (min … max): 134.7 ms … 159.4 ms 19 runs
Expand All @@ -120,3 +122,4 @@ Benchmark #2: optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.
Summary
'./target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png' ran
6.54 ± 0.29 times faster than 'optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png'
```
5 changes: 4 additions & 1 deletion scripts/compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ OXIPNG_VERSION=$(./target/release/oxipng -V)
OPTIPNG_VERSION=$(optipng -v | head -n 1)
RUST_VERSION=$(rustc -V)
echo "Tested $OXIPNG_VERSION (compiled on $RUST_VERSION) against $OPTIPNG_VERSION on $CPU with $CORES logical cores" >> README.md
echo -e '\n\n' >> README.md
echo -e '\n\n```\n' >> README.md

hyperfine --warmup 5 './target/release/oxipng -P ./tests/files/rgb_16_should_be_grayscale_8.png' 'optipng -simulate ./tests/files/rgb_16_should_be_grayscale_8.png' | ./node_modules/.bin/strip-ansi >> README.md
echo -e '\n\n' >> README.md
hyperfine --warmup 5 './target/release/oxipng -o4 -P ./tests/files/rgb_16_should_be_grayscale_8.png' 'optipng -o 4 -simulate ./tests/files/rgb_16_should_be_grayscale_8.png' | ./node_modules/.bin/strip-ansi >> README.md

echo -e '\n```\n' >> README.md

0 comments on commit b18414b

Please sign in to comment.