Skip to content

Commit 3747d91

Browse files
Trottevanlucas
authored andcommitted
benchmark: remove unused variables
Remove variables that are assigned but never used. (This was missed by the linter in previous versions of ESLint but is flagged by the current version. Updating the linter is contingent on this change or some similar remedy landing.) PR-URL: #7600 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Jeremiah Senkpiel <[email protected]>
1 parent 5192bed commit 3747d91

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

benchmark/dgram/array-vs-concat.js

-5
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ var dgram = require('dgram');
4141

4242
function server() {
4343
var sent = 0;
44-
var received = 0;
4544
var socket = dgram.createSocket('udp4');
4645

4746
var onsend = type === 'concat' ? onsendConcat : onsendMulti;
@@ -71,9 +70,5 @@ function server() {
7170
}, dur * 1000);
7271
});
7372

74-
socket.on('message', function(buf, rinfo) {
75-
received++;
76-
});
77-
7873
socket.bind(PORT);
7974
}

benchmark/http/_chunky_http_client.js

-4
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ function main(conf) {
5050
}
5151
}
5252

53-
var success = 0;
54-
var failure = 0;
5553
var min = 10;
5654
var size = 0;
5755
var mod = 317;
@@ -69,14 +67,12 @@ function main(conf) {
6967
if ((d.length === pattern.length && d === pattern) ||
7068
(d.length > pattern.length &&
7169
d.slice(0, pattern.length) === pattern)) {
72-
success += 1;
7370
did = true;
7471
} else {
7572
pattern = 'HTTP/1.1 ';
7673
if ((d.length === pattern.length && d === pattern) ||
7774
(d.length > pattern.length &&
7875
d.slice(0, pattern.length) === pattern)) {
79-
failure += 1;
8076
did = true;
8177
}
8278
}

benchmark/static_http_server.js

-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ var port = 12346;
66
var n = 700;
77
var bytes = 1024 * 5;
88

9-
var requests = 0;
109
var responses = 0;
1110

1211
var body = 'C'.repeat(bytes);
@@ -37,6 +36,5 @@ server.listen(port, function() {
3736
});
3837
});
3938
req.id = i;
40-
requests++;
4139
}
4240
});

0 commit comments

Comments
 (0)