summaryrefslogtreecommitdiff
path: root/benchmark/crypto/rsa-encrypt-decrypt-throughput.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-01-23 13:17:56 +0100
committerRuben Bridgewater <ruben@bridgewater.de>2018-02-01 10:49:00 +0100
commit39ae0b98009e8d235ee7c6d885fd9702a49949ee (patch)
treedca144507b584305d6da54ae6f8fec36e9981da8 /benchmark/crypto/rsa-encrypt-decrypt-throughput.js
parent794e489eeadbe40fec7928ed9b8f25d7019d795e (diff)
downloadandroid-node-v8-39ae0b98009e8d235ee7c6d885fd9702a49949ee.tar.gz
android-node-v8-39ae0b98009e8d235ee7c6d885fd9702a49949ee.tar.bz2
android-node-v8-39ae0b98009e8d235ee7c6d885fd9702a49949ee.zip
benchmark: (crypto) refactor
PR-URL: https://github.com/nodejs/node/pull/18320 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/crypto/rsa-encrypt-decrypt-throughput.js')
-rw-r--r--benchmark/crypto/rsa-encrypt-decrypt-throughput.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/benchmark/crypto/rsa-encrypt-decrypt-throughput.js b/benchmark/crypto/rsa-encrypt-decrypt-throughput.js
index edab5ae08f..40b69c31f9 100644
--- a/benchmark/crypto/rsa-encrypt-decrypt-throughput.js
+++ b/benchmark/crypto/rsa-encrypt-decrypt-throughput.js
@@ -22,10 +22,10 @@ const bench = common.createBenchmark(main, {
len: [16, 32, 64]
});
-function main(conf) {
- const message = Buffer.alloc(conf.len, 'b');
+function main({ len, algo, keylen, n }) {
+ const message = Buffer.alloc(len, 'b');
bench.start();
- StreamWrite(conf.algo, conf.keylen, message, conf.n, conf.len);
+ StreamWrite(algo, keylen, message, n, len);
}
function StreamWrite(algo, keylen, message, n, len) {