Skip to content
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

Draft
wants to merge 9 commits into
base: gh-pages
Choose a base branch
from
Draft

Fix/update benchmark #1109

wants to merge 9 commits into from

Conversation

XhmikosR
Copy link
Collaborator

@XhmikosR XhmikosR commented Oct 2, 2021

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.

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);
Copy link
Collaborator Author

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

@XhmikosR XhmikosR force-pushed the benchmark branch 2 times, most recently from e8efec9 to 4dcff16 Compare October 2, 2021 11:59
@XhmikosR XhmikosR marked this pull request as ready for review October 2, 2021 12:01
@XhmikosR XhmikosR marked this pull request as draft October 8, 2021 15:45
.on('finish', callback);
}

function brotli(inPath, outPath, callback) {
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant