Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff95eb7

Browse filesBrowse files
aduh95MylesBorins
authored andcommitted
benchmark: add trailing commas in benchmark/crypto
PR-URL: #46553 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com>
1 parent 638d9b8 commit ff95eb7
Copy full SHA for ff95eb7
Expand file treeCollapse file tree

13 files changed

+19
-20
lines changed
Open diff view settings
Collapse file

‎benchmark/.eslintrc.yaml‎

Copy file name to clipboardExpand all lines: benchmark/.eslintrc.yaml
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ rules:
99

1010
overrides:
1111
- files:
12-
- crypto/*.js
1312
- http/*.js
1413
- path/*.js
1514
rules:
Collapse file

‎benchmark/crypto/aes-gcm-throughput.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/aes-gcm-throughput.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const keylen = { 'aes-128-gcm': 16, 'aes-192-gcm': 24, 'aes-256-gcm': 32 };
55
const bench = common.createBenchmark(main, {
66
n: [500],
77
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],
99
});
1010

1111
function main({ n, len, cipher }) {
Collapse file

‎benchmark/crypto/cipher-stream.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/cipher-stream.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ const bench = common.createBenchmark(main, {
66
cipher: ['AES192', 'AES256'],
77
type: ['asc', 'utf', 'buf'],
88
len: [2, 1024, 102400, 1024 * 1024],
9-
api: ['legacy', 'stream']
9+
api: ['legacy', 'stream'],
1010
}, {
11-
flags: ['--no-warnings']
11+
flags: ['--no-warnings'],
1212
});
1313

1414
function main({ api, cipher, type, len, writes }) {
Collapse file

‎benchmark/crypto/get-ciphers.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/get-ciphers.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const common = require('../common.js');
44

55
const bench = common.createBenchmark(main, {
66
n: [1, 5000],
7-
v: ['crypto', 'tls']
7+
v: ['crypto', 'tls'],
88
});
99

1010
function main({ n, v }) {
Collapse file

‎benchmark/crypto/hash-stream-creation.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/hash-stream-creation.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const bench = common.createBenchmark(main, {
1010
type: ['asc', 'utf', 'buf'],
1111
out: ['hex', 'binary', 'buffer'],
1212
len: [2, 1024, 102400, 1024 * 1024],
13-
api: ['legacy', 'stream']
13+
api: ['legacy', 'stream'],
1414
});
1515

1616
function main({ api, type, len, out, writes, algo }) {
Collapse file

‎benchmark/crypto/hash-stream-throughput.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/hash-stream-throughput.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, {
99
algo: ['sha1', 'sha256', 'sha512'],
1010
type: ['asc', 'utf', 'buf'],
1111
len: [2, 1024, 102400, 1024 * 1024],
12-
api: ['legacy', 'stream']
12+
api: ['legacy', 'stream'],
1313
});
1414

1515
function main({ api, type, len, algo, writes }) {
Collapse file

‎benchmark/crypto/hkdf.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/hkdf.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const common = require('../common.js');
44
const assert = require('assert');
55
const {
66
hkdf,
7-
hkdfSync
7+
hkdfSync,
88
} = require('crypto');
99

1010
const bench = common.createBenchmark(main, {
Collapse file

‎benchmark/crypto/keygen.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/keygen.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const common = require('../common.js');
44
const assert = require('assert');
55
const {
66
generateKeyPair,
7-
generateKeyPairSync
7+
generateKeyPairSync,
88
} = require('crypto');
99

1010
const bench = common.createBenchmark(main, {
@@ -18,7 +18,7 @@ const methods = {
1818
for (let i = 0; i < n; ++i) {
1919
generateKeyPairSync('rsa', {
2020
modulusLength: 1024,
21-
publicExponent: 0x10001
21+
publicExponent: 0x10001,
2222
});
2323
}
2424
bench.end(n);
@@ -35,7 +35,7 @@ const methods = {
3535
for (let i = 0; i < n; ++i)
3636
generateKeyPair('rsa', {
3737
modulusLength: 512,
38-
publicExponent: 0x10001
38+
publicExponent: 0x10001,
3939
}, done);
4040
},
4141

Collapse file

‎benchmark/crypto/oneshot-sign-verify.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/oneshot-sign-verify.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const keyFixtures = {
99
publicKey: fs.readFileSync(`${fixtures_keydir}/ec_p256_public.pem`)
1010
.toString(),
1111
privateKey: fs.readFileSync(`${fixtures_keydir}/ec_p256_private.pem`)
12-
.toString()
12+
.toString(),
1313
};
1414

1515
const data = crypto.randomBytes(256);
@@ -20,7 +20,7 @@ let keyObjects;
2020
function getKeyObject({ privateKey, publicKey }) {
2121
return {
2222
privateKey: crypto.createPrivateKey(privateKey),
23-
publicKey: crypto.createPublicKey(publicKey)
23+
publicKey: crypto.createPublicKey(publicKey),
2424
};
2525
}
2626

@@ -60,15 +60,15 @@ function measureAsyncSerial(n, privateKey, publicKey, keys) {
6060
data,
6161
{
6262
key: privateKey || keys[n - remaining].privateKey,
63-
dsaEncoding: 'ieee-p1363'
63+
dsaEncoding: 'ieee-p1363',
6464
},
6565
(err, signature) => {
6666
crypto.verify(
6767
'sha256',
6868
data,
6969
{
7070
key: publicKey || keys[n - remaining].publicKey,
71-
dsaEncoding: 'ieee-p1363'
71+
dsaEncoding: 'ieee-p1363',
7272
},
7373
signature,
7474
done);
@@ -104,7 +104,7 @@ function measureAsyncParallel(n, privateKey, publicKey, keys) {
104104
function main({ n, mode, keyFormat }) {
105105
pems ||= [...Buffer.alloc(n)].map(() => ({
106106
privateKey: keyFixtures.privateKey,
107-
publicKey: keyFixtures.publicKey
107+
publicKey: keyFixtures.publicKey,
108108
}));
109109
keyObjects ||= pems.map(getKeyObject);
110110

Collapse file

‎benchmark/crypto/randomInt.js‎

Copy file name to clipboardExpand all lines: benchmark/crypto/randomInt.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const bench = common.createBenchmark(main, {
77
mode: ['sync', 'async-sequential', 'async-parallel'],
88
min: [-(2 ** 47) + 1, -10_000, -100],
99
max: [100, 10_000, 2 ** 47],
10-
n: [1e3, 1e5]
10+
n: [1e3, 1e5],
1111
});
1212

1313
function main({ mode, min, max, n }) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.