Skip to content

Commit 4b80f21

Browse files
committed
bench: Simplify duration arguments to benchmarks
For throughput benchmarks, run with just 5s durations rather than 1s and 3s. For startup benchmark, run with just a single 1s duration, since it's very consistent anyway.
1 parent 2ed56e5 commit 4b80f21

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

benchmark/fs/readfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var filename = path.resolve(__dirname, '.removeme-benchmark-garbage');
88
var fs = require('fs');
99

1010
var bench = common.createBenchmark(main, {
11-
dur: [1, 3],
11+
dur: [5],
1212
len: [1024, 16 * 1024 * 1024],
1313
concurrent: [1, 10]
1414
});

benchmark/fs/write-stream-throughput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var filename = path.resolve(__dirname, '.removeme-benchmark-garbage');
66
var fs = require('fs');
77

88
var bench = common.createBenchmark(main, {
9-
dur: [1, 3],
9+
dur: [5],
1010
type: ['buf', 'asc', 'utf'],
1111
size: [2, 1024, 65535, 1024 * 1024]
1212
});

benchmark/misc/startup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var i = 0;
77
var start;
88

99
var bench = common.createBenchmark(startNode, {
10-
dur: [1, 3]
10+
dur: [1]
1111
});
1212

1313
function startNode(conf) {

benchmark/net/net-c2s.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var PORT = common.PORT;
66
var bench = common.createBenchmark(main, {
77
len: [102400, 1024 * 1024 * 16],
88
type: ['utf', 'asc', 'buf'],
9-
dur: [1, 3],
9+
dur: [5],
1010
});
1111

1212
var dur;

benchmark/net/net-pipe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var PORT = common.PORT;
66
var bench = common.createBenchmark(main, {
77
len: [102400, 1024 * 1024 * 16],
88
type: ['utf', 'asc', 'buf'],
9-
dur: [1, 3],
9+
dur: [5],
1010
});
1111

1212
var dur;

benchmark/net/net-s2c.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ var PORT = common.PORT;
66
var bench = common.createBenchmark(main, {
77
len: [102400, 1024 * 1024 * 16],
88
type: ['utf', 'asc', 'buf'],
9-
dur: [1, 3],
9+
dur: [5]
1010
});
1111

1212
var dur;

benchmark/net/tcp-raw-c2s.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var common = require('../common.js');
99
var bench = common.createBenchmark(main, {
1010
len: [102400, 1024 * 1024 * 16],
1111
type: ['utf', 'asc', 'buf'],
12-
dur: [1, 3],
12+
dur: [5]
1313
});
1414

1515
var TCP = process.binding('tcp_wrap').TCP;

benchmark/net/tcp-raw-pipe.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var common = require('../common.js');
99
var bench = common.createBenchmark(main, {
1010
len: [102400, 1024 * 1024 * 16],
1111
type: ['utf', 'asc', 'buf'],
12-
dur: [1, 3],
12+
dur: [5]
1313
});
1414

1515
var TCP = process.binding('tcp_wrap').TCP;

benchmark/net/tcp-raw-s2c.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ var common = require('../common.js');
99
var bench = common.createBenchmark(main, {
1010
len: [102400, 1024 * 1024 * 16],
1111
type: ['utf', 'asc', 'buf'],
12-
dur: [1, 3],
12+
dur: [5]
1313
});
1414

1515
var TCP = process.binding('tcp_wrap').TCP;

benchmark/tls/throughput.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var common = require('../common.js');
22
var bench = common.createBenchmark(main, {
3-
dur: [1, 3],
3+
dur: [5],
44
type: ['buf', 'asc', 'utf'],
55
size: [2, 1024, 1024 * 1024]
66
});

0 commit comments

Comments
 (0)