Skip to content

Commit 520c0b0

Browse files
TrottMyles Borins
authored and
Myles Borins
committed
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 b9fabff commit 520c0b0

File tree

3 files changed

+0
-11
lines changed

3 files changed

+0
-11
lines changed

benchmark/http/_chunky_http_client.js

Lines changed: 0 additions & 4 deletions
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/net/dgram.js

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ var dgram = require('dgram');
3333

3434
function server() {
3535
var sent = 0;
36-
var received = 0;
3736
var socket = dgram.createSocket('udp4');
3837

3938
function onsend() {
@@ -53,9 +52,5 @@ function server() {
5352
}, dur * 1000);
5453
});
5554

56-
socket.on('message', function(buf, rinfo) {
57-
received++;
58-
});
59-
6055
socket.bind(PORT);
6156
}

benchmark/static_http_server.js

Lines changed: 0 additions & 2 deletions
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)