From 7247f9e6e3cc39f7bf28938b60f7d49fb6dba80d Mon Sep 17 00:00:00 2001 From: Wilson Lin Date: Mon, 9 Aug 2021 00:08:30 +1000 Subject: [PATCH] Fix graphs --- .github/workflows/bench.yaml | 2 ++ README.md | 4 ++-- bench/graph.js | 1 + bench/run | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bench.yaml b/.github/workflows/bench.yaml index cb85a02..20db9b8 100644 --- a/.github/workflows/bench.yaml +++ b/.github/workflows/bench.yaml @@ -57,6 +57,8 @@ jobs: run: | b2 authorize-account ${{ secrets.CICD_CLI_B2_KEY_ID }} ${{ secrets.CICD_CLI_B2_APPLICATION_KEY }} ./run + node graph.js b2 sync ./graphs/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/minify-html/bench/${{ steps.version.outputs.VERSION }}/js/ MHB_HTML_ONLY=1 ./run + node graph.js b2 sync ./graphs/ b2://${{ secrets.CICD_CLI_B2_BUCKET_NAME }}/minify-html/bench/${{ steps.version.outputs.VERSION }}/core/ diff --git a/README.md b/README.md index ba06d89..46542d1 100644 --- a/README.md +++ b/README.md @@ -19,8 +19,8 @@ A Rust HTML minifier meticulously optimised for speed and effectiveness, with bi Comparison with [html-minfier](https://github.com/kangax/html-minifier) and [minimize](https://github.com/Swaagie/minimize), run on the top web pages. [See the breakdown here.](./bench) -Chart showing speed of HTML minifiers -Chart showing compression of HTML minifiers +Chart showing speed of HTML minifiers +Chart showing compression of HTML minifiers The [onepass](https://github.com/wilsonzlin/minify-html/tree/master/rust/onepass) variant is even more optimised for speed. See its [README](https://github.com/wilsonzlin/minify-html/tree/master/rust/onepass) for more details. diff --git a/bench/graph.js b/bench/graph.js index 9c2ad6e..b150649 100644 --- a/bench/graph.js +++ b/bench/graph.js @@ -81,6 +81,7 @@ const averageChartOptions = (label) => ({ scales: { xAxes: [ { + barPercentage: 0.5, gridLines: { display: false, }, diff --git a/bench/run b/bench/run index 944dc2c..694e604 100755 --- a/bench/run +++ b/bench/run @@ -12,7 +12,7 @@ done results_dir="$PWD/results" input_dir="$PWD/inputs" -iterations=${MHB_ITERATIONS:-100} +iterations=${MHB_ITERATIONS:-25} mkdir -p "$results_dir"