mirror of
https://github.com/lovell/sharp.git
synced 2025-07-08 18:20:13 +02:00
Tests: update benchmark environment
This commit is contained in:
parent
1422798c1d
commit
96dfd400b2
@ -1,11 +1,11 @@
|
||||
FROM ubuntu:24.10
|
||||
FROM ubuntu:25.04
|
||||
ARG BRANCH=main
|
||||
|
||||
# Install basic dependencies
|
||||
RUN apt-get -y update && apt-get install -y build-essential curl git ca-certificates gnupg
|
||||
|
||||
# Install latest Node.js LTS
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_24.x -o nodesource_setup.sh
|
||||
RUN bash nodesource_setup.sh
|
||||
RUN apt-get install -y nodejs
|
||||
|
||||
|
@ -552,6 +552,32 @@ async.series({
|
||||
}
|
||||
});
|
||||
}
|
||||
}).add('sharp-mks2013', {
|
||||
defer: true,
|
||||
fn: function (deferred) {
|
||||
sharp(inputJpgBuffer)
|
||||
.resize(width, height, { kernel: 'mks2013' })
|
||||
.toBuffer(function (err) {
|
||||
if (err) {
|
||||
throw err;
|
||||
} else {
|
||||
deferred.resolve();
|
||||
}
|
||||
});
|
||||
}
|
||||
}).add('sharp-mks2021', {
|
||||
defer: true,
|
||||
fn: function (deferred) {
|
||||
sharp(inputJpgBuffer)
|
||||
.resize(width, height, { kernel: 'mks2021' })
|
||||
.toBuffer(function (err) {
|
||||
if (err) {
|
||||
throw err;
|
||||
} else {
|
||||
deferred.resolve();
|
||||
}
|
||||
});
|
||||
}
|
||||
}).on('cycle', function (event) {
|
||||
console.log('kernels ' + String(event.target));
|
||||
}).on('complete', function () {
|
||||
|
Loading…
x
Reference in New Issue
Block a user