You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.markdown
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,7 @@
3
3
## unreleased
4
4
5
5
* Correct environment variable to specify `jpeg-recompress` location [@toy](https://github.com/toy)
6
+
* Added --benchmark, to compare performance of each tool [#217](https://github.com/toy/image_optim/issues/217)[#218](https://github.com/toy/image_optim/pull/218)[@gurgeous](https://github.com/gurgeous)
Copy file name to clipboardExpand all lines: README.markdown
+23Lines changed: 23 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -301,6 +301,29 @@ optipng:
301
301
302
302
`image_optim` uses standard ruby library for creating temporary files. Temporary directory can be changed using one of `TMPDIR`, `TMP` or `TEMP` environment variables.
303
303
304
+
### Benchmark
305
+
306
+
Run with `--benchmark` to compare the performance of each individual tool on your images:
307
+
308
+
```sh
309
+
image_optim --benchmark=isolated -r /tmp/corpus/
310
+
```
311
+
312
+
```
313
+
benchmarking: 100.0% (elapsed: 3.9m)
314
+
315
+
BENCHMARK RESULTS
316
+
317
+
name files elapsed kb saved kb/s
318
+
-------- ----- ------- -------- -------
319
+
oxipng 50 8.906 1867.253 209.664
320
+
pngquant 50 1.980 214.597 108.386
321
+
pngcrush 50 22.529 1753.704 77.841
322
+
optipng 50 142.940 1641.101 11.481
323
+
advpng 50 137.753 962.549 6.987
324
+
pngout 50 426.706 444.679 1.042
325
+
```
326
+
304
327
## Options
305
328
306
329
* `:nice` — Nice level, priority of all used tools with higher value meaning lower priority, in range `-20..19`, negative values can be set only if run by root user *(defaults to `10`)*
0 commit comments