Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b464ce

Browse filesBrowse files
TrottMyles Borins
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 <rod@vagg.org> Reviewed-By: Michaël Zasso <mic.besace@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
1 parent 3241536 commit 4b464ce
Copy full SHA for 4b464ce

File tree

Expand file treeCollapse file tree

5 files changed

+0
-19
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

5 files changed

+0
-19
lines changed
Open diff view settings
Collapse file

‎benchmark/http/_chunky_http_client.js‎

Copy file name to clipboardExpand all lines: benchmark/http/_chunky_http_client.js
-4Lines 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
}
Collapse file

‎benchmark/static_http_server.js‎

Copy file name to clipboardExpand all lines: benchmark/static_http_server.js
-2Lines 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
});
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-event-emitter-remove-listeners.js
-4Lines changed: 0 additions & 4 deletions
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() {
Collapse file

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

Copy file name to clipboardExpand all lines: test/parallel/test-tls-session-cache.js
-4Lines changed: 0 additions & 4 deletions
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);
Collapse file

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

Copy file name to clipboardExpand all lines: test/sequential/test-pump-file2tcp-noexist.js
-5Lines changed: 0 additions & 5 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.