Skip to content

Commit 9e7fd8e

Browse files
adrian-nitu-92AndreasMadsen
authored andcommitted
benchmark: fix comment typos and code format
I noticed some typos and the lack of {} following an if. PR-URL: #7961 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Andreas Madsen <[email protected]>
1 parent b9832eb commit 9e7fd8e

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

benchmark/common.js

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function Benchmark(fn, options) {
3030
Benchmark.prototype._parseArgs = function(argv, options) {
3131
const cliOptions = Object.assign({}, options);
3232

33-
// Parse configuarion arguments
33+
// Parse configuration arguments
3434
for (const arg of argv) {
3535
const match = arg.match(/^(.+?)=([\s\S]*)$/);
3636
if (!match || !match[1]) {
@@ -52,7 +52,7 @@ Benchmark.prototype._queue = function(options) {
5252
const queue = [];
5353
const keys = Object.keys(options);
5454

55-
// Perform a depth-first walk though all options to genereate a
55+
// Perform a depth-first walk though all options to generate a
5656
// configuration list that contains all combinations.
5757
function recursive(keyIndex, prevConfig) {
5858
const key = keys[keyIndex];
@@ -171,9 +171,9 @@ Benchmark.prototype._run = function() {
171171
};
172172

173173
Benchmark.prototype.start = function() {
174-
if (this._started)
174+
if (this._started) {
175175
throw new Error('Called start more than once in a single benchmark');
176-
176+
}
177177
this._started = true;
178178
this._time = process.hrtime();
179179
};
@@ -195,7 +195,7 @@ Benchmark.prototype.end = function(operations) {
195195
};
196196

197197
function formatResult(data) {
198-
// Construct confiuration string, " A=a, B=b, ..."
198+
// Construct configuration string, " A=a, B=b, ..."
199199
let conf = '';
200200
for (const key of Object.keys(data.conf)) {
201201
conf += ' ' + key + '=' + JSON.stringify(data.conf[key]);

benchmark/compare.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ console.log('"binary", "filename", "configuration", "rate", "time"');
6565
}
6666
conf = conf.slice(1);
6767

68-
// Escape qoutes (") for correct csv formatting
68+
// Escape quotes (") for correct csv formatting
6969
conf = conf.replace(/"/g, '""');
7070

7171
console.log(`"${job.binary}", "${job.filename}", "${conf}", ` +

0 commit comments

Comments
 (0)