Skip to content

Commit f5ab3e4

Browse files
committed
benchmark: fixate ciphers in tls benchmarks
Benchmark should always use the same cipher in order to be truthful.
1 parent 1903240 commit f5ab3e4

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

benchmark/tls/throughput.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ function main(conf) {
3939

4040
options = { key: fs.readFileSync(cert_dir + '/test_key.pem'),
4141
cert: fs.readFileSync(cert_dir + '/test_cert.pem'),
42-
ca: [ fs.readFileSync(cert_dir + '/test_ca.pem') ] };
42+
ca: [ fs.readFileSync(cert_dir + '/test_ca.pem') ],
43+
ciphers: 'AES256-GCM-SHA384' };
4344

4445
server = tls.createServer(options, onConnection);
4546
setTimeout(done, dur * 1000);

benchmark/tls/tls-connect.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ function main(conf) {
2323
var cert_dir = path.resolve(__dirname, '../../test/fixtures'),
2424
options = { key: fs.readFileSync(cert_dir + '/test_key.pem'),
2525
cert: fs.readFileSync(cert_dir + '/test_cert.pem'),
26-
ca: [ fs.readFileSync(cert_dir + '/test_ca.pem') ] };
26+
ca: [ fs.readFileSync(cert_dir + '/test_ca.pem') ],
27+
ciphers: 'AES256-GCM-SHA384' };
2728

2829
server = tls.createServer(options, onConnection);
2930
server.listen(common.PORT, onListening);

0 commit comments

Comments
 (0)