Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[Squash] Address mscdex's suggestion
@Trott, feel free to drop this out if you disagree.
  • Loading branch information
jasnell authored Aug 23, 2017
commit 36572642ab2c4d2d784cd5702a05daa94622440d
7 changes: 4 additions & 3 deletions benchmark/dgram/bind-params.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const configs = {
};

const bench = common.createBenchmark(main, configs);
const noop = () => {};

function main(conf) {
const n = +conf.n;
Expand All @@ -20,7 +21,7 @@ function main(conf) {
bench.start();
for (let i = 0; i < n; i++) {
dgram.createSocket('udp4').bind(port, address)
.on('error', () => {})
.on('error', noop)
.unref();
}
bench.end(n);
Expand All @@ -29,7 +30,7 @@ function main(conf) {
for (let i = 0; i < n; i++) {
dgram.createSocket('udp4')
.bind(port)
.on('error', () => {})
.on('error', noop)
.unref();
}
bench.end(n);
Expand All @@ -38,7 +39,7 @@ function main(conf) {
for (let i = 0; i < n; i++) {
dgram.createSocket('udp4')
.bind()
.on('error', () => {})
.on('error', noop)
.unref();
}
bench.end(n);
Expand Down