benchmark: fix variables not being set
Due to the destructuring the outer variables were not set anymore. PR-URL: https://github.com/nodejs/node/pull/18320 Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
d4015b8995
commit
f951c9a9f0
@ -11,12 +11,13 @@ const bench = common.createBenchmark(main, {
|
||||
|
||||
var clientConn = 0;
|
||||
var serverConn = 0;
|
||||
var server;
|
||||
var dur;
|
||||
var concurrency;
|
||||
var running = true;
|
||||
|
||||
function main({ dur, concurrency }) {
|
||||
function main(conf) {
|
||||
dur = conf.dur;
|
||||
concurrency = conf.concurrency;
|
||||
const cert_dir = path.resolve(__dirname, '../../test/fixtures');
|
||||
const options = {
|
||||
key: fs.readFileSync(`${cert_dir}/test_key.pem`),
|
||||
@ -25,7 +26,7 @@ function main({ dur, concurrency }) {
|
||||
ciphers: 'AES256-GCM-SHA384'
|
||||
};
|
||||
|
||||
server = tls.createServer(options, onConnection);
|
||||
const server = tls.createServer(options, onConnection);
|
||||
server.listen(common.PORT, onListening);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user