Skip to content

Commit 4b464ce

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 3241536 commit 4b464ce

5 files changed

+0
-19
lines changed

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
});

test/parallel/test-event-emitter-remove-listeners.js

-4
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,12 @@ var common = require('../common');
33
var assert = require('assert');
44
var events = require('events');
55

6-
var count = 0;
7-
86
function listener1() {
97
console.log('listener1');
10-
count++;
118
}
129

1310
function listener2() {
1411
console.log('listener2');
15-
count++;
1612
}
1713

1814
function remove1() {

test/parallel/test-tls-session-cache.js

-4
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,7 @@ function doTest(testOptions, callback) {
8989
var client = spawn(common.opensslCli, args, {
9090
stdio: [ 0, 1, 'pipe' ]
9191
});
92-
var err = '';
9392
client.stderr.setEncoding('utf8');
94-
client.stderr.on('data', function(chunk) {
95-
err += chunk;
96-
});
9793
client.on('exit', function(code) {
9894
console.error('done');
9995
assert.equal(code, 0);

test/sequential/test-pump-file2tcp-noexist.js

-5
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ var server = net.createServer(function(stream) {
2626
server.listen(common.PORT, function() {
2727
var conn = net.createConnection(common.PORT);
2828
conn.setEncoding('utf8');
29-
conn.on('data', function(chunk) {
30-
buffer += chunk;
31-
});
3229

3330
conn.on('end', function() {
3431
conn.end();
@@ -39,8 +36,6 @@ server.listen(common.PORT, function() {
3936
});
4037
});
4138

42-
var buffer = '';
43-
4439
process.on('exit', function() {
4540
assert.equal(true, got_error);
4641
assert.equal(true, conn_closed);

0 commit comments

Comments
 (0)