summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/net/net-pipe.js2
-rw-r--r--benchmark/tls/secure-pair.js10
2 files changed, 8 insertions, 4 deletions
diff --git a/benchmark/net/net-pipe.js b/benchmark/net/net-pipe.js
index f19e30b545..06426129f7 100644
--- a/benchmark/net/net-pipe.js
+++ b/benchmark/net/net-pipe.js
@@ -6,7 +6,7 @@ const net = require('net');
const PORT = common.PORT;
const bench = common.createBenchmark(main, {
- len: [64, 102400, 1024 * 1024 * 16],
+ len: [2, 64, 102400, 1024 * 1024 * 16],
type: ['utf', 'asc', 'buf'],
dur: [5],
});
diff --git a/benchmark/tls/secure-pair.js b/benchmark/tls/secure-pair.js
index c0409febac..c52f4cbf91 100644
--- a/benchmark/tls/secure-pair.js
+++ b/benchmark/tls/secure-pair.js
@@ -2,8 +2,8 @@
const common = require('../common.js');
const bench = common.createBenchmark(main, {
dur: [5],
- securing: ['SecurePair', 'TLSSocket'],
- size: [2, 1024, 1024 * 1024]
+ securing: ['SecurePair', 'TLSSocket', 'clear'],
+ size: [2, 100, 1024, 1024 * 1024]
});
const fixtures = require('../../test/common/fixtures');
@@ -37,7 +37,8 @@ function main({ dur, size, securing }) {
isServer: false,
rejectUnauthorized: false,
};
- const conn = tls.connect(clientOptions, () => {
+ const network = securing === 'clear' ? net : tls;
+ const conn = network.connect(clientOptions, () => {
setTimeout(() => {
const mbits = (received * 8) / (1024 * 1024);
bench.end(mbits);
@@ -69,6 +70,9 @@ function main({ dur, size, securing }) {
case 'TLSSocket':
secureTLSSocket(conn, client);
break;
+ case 'clear':
+ conn.pipe(client);
+ break;
default:
throw new Error('Invalid securing method');
}