Conversation
f6b0729 to
0af9919
Compare
| [0, Number.MIN_VALUE, 1 - diffPercent], | ||
| [Number.MIN_VALUE, JND, diffPercent] |
There was a problem hiding this comment.
diffPercent part of pixels would have diff somewhere between 0 and JND (which is 2.3)
1 - diffPercent part of pixels would be equal
| const abMinValue = -38; | ||
| const abMaxValue = 128; |
There was a problem hiding this comment.
In cielab specs, minValue could be even -128, but they translate to the same rgb color
| this._suitableBucketColors = getSuitableBucketRgbColors(histBuckets, REFERENCE_COLOR); | ||
| } | ||
|
|
||
| getRandomRgbColor() { |
There was a problem hiding this comment.
Generates random color, based on the provided histogram
| benchmark.addEventListener('start', () => { | ||
| doneTasksCount++; | ||
| }); |
There was a problem hiding this comment.
"start" is emitted on "warmup" end. Progress bar need to count "warmup" as a task too
| @@ -0,0 +1,71 @@ | |||
| # looks-same Benchmark | |||
|
|
|||
| This benchmark evaluates the performance of four npm packages for image comparison: [`looks-same`](https://github.com/gemini-testing/looks-same), [`pixelmatch`](https://github.com/mapbox/pixelmatch), [`resemblejs`](https://github.com/rsmbl/Resemble.js), and [`blink-diff`](https://github.com/yahoo/blink-diff). | |||
There was a problem hiding this comment.
blink-diff is archived. Should we still use it?
There was a problem hiding this comment.
The repo is archived, but the package is not deprecated: https://www.npmjs.com/package/blink-diff
So why not? 4 > 3
benchmark/results.md
Outdated
| | looks-same | 42.81 | 41 | 56.26 | 41.95 | 53.13 | | ||
| | pixelmatch | 49.13 | 47.32 | 53.28 | 48.32 | 52.86 | | ||
| | resemblejs | 46.57 | 44.38 | 71.32 | 45.76 | 58.08 | | ||
| | blink-diff | 62.19 | 55.29 | 73.72 | 61.96 | 73.52 | |
There was a problem hiding this comment.
maybe it's worth highlighting the best results in some color (green)? So that the winner is immediately visible.
Moreover a lot of numbers here, looks like we can remove min and max in order to simplify the table
benchmark/image-generator/index.js
Outdated
| Object.assign(module.exports, require('./reference-generator')); | ||
| Object.assign(module.exports, require('./contrast-to-reference-generator')); | ||
| Object.assign(module.exports, require('./fixed-visible-diff-amount-generator')); | ||
| Object.assign(module.exports, require('./fixed-invisible-diff-amount-generator')); |
There was a problem hiding this comment.
Why we should write code like this?
There was a problem hiding this comment.
Fixed:
exports.WebAverageFailedGenerator = require('./web-average-failed-generator').WebAverageFailedGenerator;
exports.WebAverageSuccessGenerator = require('./web-average-success-generator').WebAverageSuccessGenerator;
exports.ReferenceGenerator = require('./reference-generator').ReferenceGenerator;
exports.ContrastToReferenceGenerator = require('./contrast-to-reference-generator').ContrastToReferenceGenerator;
exports.FixedVisibleDiffAmountGenerator = require('./fixed-visible-diff-amount-generator').FixedVisibleDiffAmountGenerator;0af9919 to
48f3105
Compare
48f3105 to
c3412bf
Compare
Uh oh!
There was an error while loading. Please reload this page.