Update benchmark test dependencies

This commit is contained in:
Lovell Fuller 2018-01-02 20:19:11 +00:00
parent 358b8fe8b6
commit 9bd2cec199
3 changed files with 8 additions and 7 deletions

View File

@ -8,16 +8,16 @@
"test": "node perf && node random && node parallel"
},
"devDependencies": {
"async": "^2.5.0",
"async": "^2.6.0",
"benchmark": "^2.1.4",
"gm": "^1.23.0",
"gm": "^1.23.1",
"imagemagick": "^0.1.3",
"imagemagick-native": "^1.9.3",
"images": "^3.0.0",
"images": "^3.0.1",
"jimp": "^0.2.28",
"mapnik": "^3.6.2",
"pajk-lwip": "^0.2.0",
"semver": "^5.3.0"
"semver": "^5.4.1"
},
"license": "Apache-2.0",
"engines": {

View File

@ -31,6 +31,7 @@ async.mapSeries([1, 1, 2, 4, 8, 16, 32, 64], function (parallelism, next) {
function (err, ids) {
assert(!err);
assert(ids.length === parallelism);
ids.sort();
const mean = ids.reduce(function (a, b) {
return a + b;
}) / ids.length;

View File

@ -601,7 +601,7 @@ async.series({
callback(null, this.filter('fastest').map('name'));
}).run();
},
// Comparitive speed of kernels
// Comparative speed of kernels
kernels: function (callback) {
const inputJpgBuffer = fs.readFileSync(fixtures.inputJpg);
(new Benchmark.Suite('kernels')).add('sharp-cubic', {
@ -911,12 +911,12 @@ async.series({
}
});
}
}).add('sharp-withoutAdaptiveFiltering', {
}).add('sharp-adaptiveFiltering', {
defer: true,
fn: function (deferred) {
sharp(inputPngBuffer)
.resize(width, height)
.png({ adaptiveFiltering: false })
.png({ adaptiveFiltering: true })
.toBuffer(function (err, buffer) {
if (err) {
throw err;