GeezerVison is showing github.com — benchmark: add trailing commas in `benchmark/crypto` · nodejs/node@e0f4360
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/.eslintrc.yaml -1Lines changed: 0 additions & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 9 | 9 |
| 10 | 10 | overrides: | 11 | 11 | - files: | 12 | | - - crypto/*.js | 13 | 12 | - http/*.js | 14 | 13 | - path/*.js | 15 | 14 | rules: | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/crypto/aes-gcm-throughput.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,7 +5,7 @@ const keylen = { 'aes-128-gcm': 16, 'aes-192-gcm': 24, 'aes-256-gcm': 32 }; | 5 | 5 | const bench = common.createBenchmark(main, { | 6 | 6 | n: [500], | 7 | 7 | cipher: ['aes-128-gcm', 'aes-192-gcm', 'aes-256-gcm'], | 8 | | - len: [1024, 4 * 1024, 16 * 1024, 64 * 1024, 256 * 1024, 1024 * 1024] | | 8 | + len: [1024, 4 * 1024, 16 * 1024, 64 * 1024, 256 * 1024, 1024 * 1024], | 9 | 9 | }); | 10 | 10 |
| 11 | 11 | function main({ n, len, cipher }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/crypto/cipher-stream.js +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,9 +6,9 @@ const bench = common.createBenchmark(main, { | 6 | 6 | cipher: ['AES192', 'AES256'], | 7 | 7 | type: ['asc', 'utf', 'buf'], | 8 | 8 | len: [2, 1024, 102400, 1024 * 1024], | 9 | | - api: ['legacy', 'stream'] | | 9 | + api: ['legacy', 'stream'], | 10 | 10 | }, { | 11 | | - flags: ['--no-warnings'] | | 11 | + flags: ['--no-warnings'], | 12 | 12 | }); | 13 | 13 |
| 14 | 14 | function main({ api, cipher, type, len, writes }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/crypto/get-ciphers.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ const common = require('../common.js'); | 4 | 4 |
| 5 | 5 | const bench = common.createBenchmark(main, { | 6 | 6 | n: [1, 5000], | 7 | | - v: ['crypto', 'tls'] | | 7 | + v: ['crypto', 'tls'], | 8 | 8 | }); | 9 | 9 |
| 10 | 10 | function main({ n, v }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/crypto/hash-stream-creation.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, { | 10 | 10 | type: ['asc', 'utf', 'buf'], | 11 | 11 | out: ['hex', 'binary', 'buffer'], | 12 | 12 | len: [2, 1024, 102400, 1024 * 1024], | 13 | | - api: ['legacy', 'stream'] | | 13 | + api: ['legacy', 'stream'], | 14 | 14 | }); | 15 | 15 |
| 16 | 16 | function main({ api, type, len, out, writes, algo }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/crypto/hash-stream-throughput.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, { | 9 | 9 | algo: ['sha1', 'sha256', 'sha512'], | 10 | 10 | type: ['asc', 'utf', 'buf'], | 11 | 11 | len: [2, 1024, 102400, 1024 * 1024], | 12 | | - api: ['legacy', 'stream'] | | 12 | + api: ['legacy', 'stream'], | 13 | 13 | }); | 14 | 14 |
| 15 | 15 | function main({ api, type, len, algo, writes }) { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/crypto/hkdf.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ const common = require('../common.js'); | 4 | 4 | const assert = require('assert'); | 5 | 5 | const { | 6 | 6 | hkdf, | 7 | | - hkdfSync | | 7 | + hkdfSync, | 8 | 8 | } = require('crypto'); | 9 | 9 |
| 10 | 10 | const bench = common.createBenchmark(main, { | |
Collapse file Copy file name to clipboardExpand all lines: benchmark/crypto/keygen.js +3-3Lines changed: 3 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -4,7 +4,7 @@ const common = require('../common.js'); | 4 | 4 | const assert = require('assert'); | 5 | 5 | const { | 6 | 6 | generateKeyPair, | 7 | | - generateKeyPairSync | | 7 | + generateKeyPairSync, | 8 | 8 | } = require('crypto'); | 9 | 9 |
| 10 | 10 | const bench = common.createBenchmark(main, { | @@ -18,7 +18,7 @@ const methods = { | 18 | 18 | for (let i = 0; i < n; ++i) { | 19 | 19 | generateKeyPairSync('rsa', { | 20 | 20 | modulusLength: 1024, | 21 | | - publicExponent: 0x10001 | | 21 | + publicExponent: 0x10001, | 22 | 22 | }); | 23 | 23 | } | 24 | 24 | bench.end(n); | @@ -35,7 +35,7 @@ const methods = { | 35 | 35 | for (let i = 0; i < n; ++i) | 36 | 36 | generateKeyPair('rsa', { | 37 | 37 | modulusLength: 512, | 38 | | - publicExponent: 0x10001 | | 38 | + publicExponent: 0x10001, | 39 | 39 | }, done); | 40 | 40 | }, | 41 | 41 |
| |
Collapse file Copy file name to clipboardExpand all lines: benchmark/crypto/oneshot-sign-verify.js +5-5Lines changed: 5 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -9,7 +9,7 @@ const keyFixtures = { | 9 | 9 | publicKey: fs.readFileSync(`${fixtures_keydir}/ec_p256_public.pem`) | 10 | 10 | .toString(), | 11 | 11 | privateKey: fs.readFileSync(`${fixtures_keydir}/ec_p256_private.pem`) | 12 | | - .toString() | | 12 | + .toString(), | 13 | 13 | }; | 14 | 14 |
| 15 | 15 | const data = crypto.randomBytes(256); | @@ -20,7 +20,7 @@ let keyObjects; | 20 | 20 | function getKeyObject({ privateKey, publicKey }) { | 21 | 21 | return { | 22 | 22 | privateKey: crypto.createPrivateKey(privateKey), | 23 | | - publicKey: crypto.createPublicKey(publicKey) | | 23 | + publicKey: crypto.createPublicKey(publicKey), | 24 | 24 | }; | 25 | 25 | } | 26 | 26 |
| @@ -60,15 +60,15 @@ function measureAsyncSerial(n, privateKey, publicKey, keys) { | 60 | 60 | data, | 61 | 61 | { | 62 | 62 | key: privateKey || keys[n - remaining].privateKey, | 63 | | - dsaEncoding: 'ieee-p1363' | | 63 | + dsaEncoding: 'ieee-p1363', | 64 | 64 | }, | 65 | 65 | (err, signature) => { | 66 | 66 | crypto.verify( | 67 | 67 | 'sha256', | 68 | 68 | data, | 69 | 69 | { | 70 | 70 | key: publicKey || keys[n - remaining].publicKey, | 71 | | - dsaEncoding: 'ieee-p1363' | | 71 | + dsaEncoding: 'ieee-p1363', | 72 | 72 | }, | 73 | 73 | signature, | 74 | 74 | done); | @@ -104,7 +104,7 @@ function measureAsyncParallel(n, privateKey, publicKey, keys) { | 104 | 104 | function main({ n, mode, keyFormat }) { | 105 | 105 | pems ||= [...Buffer.alloc(n)].map(() => ({ | 106 | 106 | privateKey: keyFixtures.privateKey, | 107 | | - publicKey: keyFixtures.publicKey | | 107 | + publicKey: keyFixtures.publicKey, | 108 | 108 | })); | 109 | 109 | keyObjects ||= pems.map(getKeyObject); | 110 | 110 |
| |
Collapse file Copy file name to clipboardExpand all lines: benchmark/crypto/randomInt.js +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, { | 7 | 7 | mode: ['sync', 'async-sequential', 'async-parallel'], | 8 | 8 | min: [-(2 ** 47) + 1, -10_000, -100], | 9 | 9 | max: [100, 10_000, 2 ** 47], | 10 | | - n: [1e3, 1e5] | | 10 | + n: [1e3, 1e5], | 11 | 11 | }); | 12 | 12 |
| 13 | 13 | function main({ mode, min, max, n }) { | |
|