GeezerVison is showing github.com — benchmark: skip running some assert benchmarks by default · nodejs/node@7592cf4
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: benchmark/assert/match.js +8-1Lines changed: 8 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,8 +4,15 @@ const common = require('../common.js'); | 4 | 4 | const assert = require('assert'); | 5 | 5 |
| 6 | 6 | const bench = common.createBenchmark(main, { | 7 | | - n: [25, 2e7], | | 7 | + n: [2e7], | 8 | 8 | method: ['match', 'doesNotMatch'], | | 9 | +}, { | | 10 | + combinationFilter(p) { | | 11 | + // These benchmarks purposefully do not run by default. They do not provide | | 12 | + // might insight, due to only being a small wrapper around a native regexp | | 13 | + // call. | | 14 | + return p.n === 1; | | 15 | + }, | 9 | 16 | }); | 10 | 17 |
| 11 | 18 | function main({ n, method }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/assert/rejects.js +8-1Lines changed: 8 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,8 +4,15 @@ const common = require('../common.js'); | 4 | 4 | const assert = require('assert'); | 5 | 5 |
| 6 | 6 | const bench = common.createBenchmark(main, { | 7 | | - n: [25, 2e5], | | 7 | + n: [2e5], | 8 | 8 | method: ['rejects', 'doesNotReject'], | | 9 | +}, { | | 10 | + combinationFilter(p) { | | 11 | + // These benchmarks purposefully do not run by default. They do not provide | | 12 | + // much insight, due to only being a small wrapper around a native promise | | 13 | + // with a few extra checks. | | 14 | + return p.n === 1; | | 15 | + }, | 9 | 16 | }); | 10 | 17 |
| 11 | 18 | async function main({ n, method }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/assert/strictequal.js +7-1Lines changed: 7 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,9 +4,15 @@ const common = require('../common.js'); | 4 | 4 | const assert = require('assert'); | 5 | 5 |
| 6 | 6 | const bench = common.createBenchmark(main, { | 7 | | - n: [25, 2e5], | | 7 | + n: [2e5], | 8 | 8 | type: ['string', 'object', 'number'], | 9 | 9 | method: ['strictEqual', 'notStrictEqual'], | | 10 | +}, { | | 11 | + combinationFilter(p) { | | 12 | + // These benchmarks purposefully do not run by default. They do not provide | | 13 | + // much insight, due to only being a small wrapper around `Object.is()`. | | 14 | + return p.n === 1; | | 15 | + }, | 10 | 16 | }); | 11 | 17 |
| 12 | 18 | function main({ type, n, method }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/assert/throws.js +7-1Lines changed: 7 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,8 +4,14 @@ const common = require('../common.js'); | 4 | 4 | const assert = require('assert'); | 5 | 5 |
| 6 | 6 | const bench = common.createBenchmark(main, { | 7 | | - n: [25, 2e5], | | 7 | + n: [2e5], | 8 | 8 | method: ['throws', 'doesNotThrow'], | | 9 | +}, { | | 10 | + combinationFilter(p) { | | 11 | + // These benchmarks purposefully do not run by default. They do not provide | | 12 | + // much insight, due to only being a small wrapper around a try / catch. | | 13 | + return p.n === 1; | | 14 | + }, | 9 | 15 | }); | 10 | 16 |
| 11 | 17 | function main({ n, method }) { | |
Collapse file Copy file name to clipboard File renamed without changes.
|