Fix op/s typos

This commit is contained in:
Wilson Lin 2020-01-25 03:08:00 +13:00
parent a43cd0cd7d
commit 5f0d799ac5
3 changed files with 5 additions and 5 deletions

View File

@ -50,7 +50,7 @@ Run [build.sh](./build.sh) to build hyperbuild-nodejs with the local hyperbuild.
Run [run.js](./run.js) to run each HTML minifier against each test and record the minified size results. This will also output the minified files in [min](./min) if inspection of minified outputs is necessary. [compare.sh](./compare.sh) is a useful script for viewing a character-by-character diff between the minified outputs of hyperbuild and html-minifier for a specific test. Pass the test's file name as the first argument.
Run [bench.js](./bench.js) to benchmark the performance of each HTML minifier against each test and record the OP/s results.
Run [bench.js](./bench.js) to benchmark the performance of each HTML minifier against each test and record the op/s results.
Run [graph.js](./graph.js) to render graphs from recorded speed and size results in the [results](./results) folder.

View File

@ -62,7 +62,7 @@ const renderChart = async (cfg) => {
data: {
labels: averageSpeeds.map(([n]) => n),
datasets: [{
label: 'Average relative OP/s',
label: 'Average relative op/s',
backgroundColor: '#1f77b4',
data: averageSpeeds.map(([_, v]) => v),
}],

View File

@ -42,11 +42,11 @@ module.exports = {
return minifierNames.map(minifier => [
minifier,
testNames
// Get OP/s for each test.
// Get operations per second for each test.
.map(test => data[test][minifier] / data[test][baselineMinifier])
// Sum all test OP/s.
// Sum all test operations per second.
.reduce((sum, c) => sum + c)
// Divide by tests count to get average OP/s.
// Divide by tests count to get average operations per second.
/ testNames.length,
]).sort((a, b) => a[1] - b[1]);
},