-
Notifications
You must be signed in to change notification settings - Fork 571
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/update benchmark #1109
base: gh-pages
Are you sure you want to change the base?
Fix/update benchmark #1109
Conversation
benchmark.js
Outdated
@@ -254,7 +254,7 @@ run(fileNames.map(function(fileName) { | |||
// Apply Brotli on minified output | |||
function(done) { | |||
readBuffer(info.filePath, function(data) { | |||
var output = new Buffer(brotli.compress(data, true).buffer); | |||
var output = Buffer.from(brotli.compress(data, true).buffer); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if .buffer
is needed anymore
e8efec9
to
4dcff16
Compare
.on('finish', callback); | ||
} | ||
|
||
function brotli(inPath, outPath, callback) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same as the gzip
function except for the method name. If someone wants to deduplicate this more please go ahead.
htmlcompressor.com
has an upper limit of ~300KB hence why it fails. We could probably just drop it later.Also, IMHO we should move the benchmark script into the benchmark folder along with its own package.json and run it on CI (probably with a cron job since we don't want it to run all the time). Otherwise it can break at any time again.