File tree 2 files changed +26
-1
lines changed
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,11 @@ function main(conf) {
45
45
} ;
46
46
47
47
server = tls . createServer ( options , onConnection ) ;
48
- setTimeout ( done , dur * 1000 ) ;
49
48
var conn ;
50
49
server . listen ( common . PORT , function ( ) {
51
50
const opt = { port : common . PORT , rejectUnauthorized : false } ;
52
51
conn = tls . connect ( opt , function ( ) {
52
+ setTimeout ( done , dur * 1000 ) ;
53
53
bench . start ( ) ;
54
54
conn . on ( 'drain' , write ) ;
55
55
write ( ) ;
Original file line number Diff line number Diff line change
1
+ 'use strict' ;
2
+
3
+ const common = require ( '../common' ) ;
4
+
5
+ if ( ! common . enoughTestMem )
6
+ common . skip ( 'Insufficient memory for TLS benchmark test' ) ;
7
+
8
+ // Because the TLS benchmarks use hardcoded ports, this should be in sequential
9
+ // rather than parallel to make sure it does not conflict with tests that choose
10
+ // random available ports.
11
+
12
+ const runBenchmark = require ( '../common/benchmark' ) ;
13
+
14
+ runBenchmark ( 'tls' ,
15
+ [
16
+ 'concurrency=1' ,
17
+ 'dur=0.1' ,
18
+ 'n=1' ,
19
+ 'size=2' ,
20
+ 'type=asc'
21
+ ] ,
22
+ {
23
+ NODEJS_BENCHMARK_ZERO_ALLOWED : 1 ,
24
+ duration : 0
25
+ } ) ;
You can’t perform that action at this time.
0 commit comments