Skip to content

Commit

Permalink
benchmark: remove unused variables
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Trott authored and MylesBorins committed Jul 12, 2016
1 parent 6d75996 commit eaf40a0
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 19 deletions.
4 changes: 0 additions & 4 deletions benchmark/http/_chunky_http_client.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,6 @@ function main(conf) {
}
}

var success = 0;
var failure = 0;
var min = 10;
var size = 0;
var mod = 317;
Expand All @@ -69,14 +67,12 @@ function main(conf) {
if ((d.length === pattern.length && d === pattern) ||
(d.length > pattern.length &&
d.slice(0, pattern.length) === pattern)) {
success += 1;
did = true;
} else {
pattern = 'HTTP/1.1 ';
if ((d.length === pattern.length && d === pattern) ||
(d.length > pattern.length &&
d.slice(0, pattern.length) === pattern)) {
failure += 1;
did = true;
}
}
Expand Down
2 changes: 0 additions & 2 deletions benchmark/static_http_server.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var port = 12346;
var n = 700;
var bytes = 1024 * 5;

var requests = 0;
var responses = 0;

var body = 'C'.repeat(bytes);
Expand Down Expand Up @@ -37,6 +36,5 @@ server.listen(port, function() {
});
});
req.id = i;
requests++;
}
});
4 changes: 0 additions & 4 deletions test/parallel/test-event-emitter-remove-listeners.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,12 @@ var common = require('../common');
var assert = require('assert');
var events = require('events');

var count = 0;

function listener1() {
console.log('listener1');
count++;
}

function listener2() {
console.log('listener2');
count++;
}

function remove1() {
Expand Down
4 changes: 0 additions & 4 deletions test/parallel/test-tls-session-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,7 @@ function doTest(testOptions, callback) {
var client = spawn(common.opensslCli, args, {
stdio: [ 0, 1, 'pipe' ]
});
var err = '';
client.stderr.setEncoding('utf8');
client.stderr.on('data', function(chunk) {
err += chunk;
});
client.on('exit', function(code) {
console.error('done');
assert.equal(code, 0);
Expand Down
5 changes: 0 additions & 5 deletions test/sequential/test-pump-file2tcp-noexist.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ var server = net.createServer(function(stream) {
server.listen(common.PORT, function() {
var conn = net.createConnection(common.PORT);
conn.setEncoding('utf8');
conn.on('data', function(chunk) {
buffer += chunk;
});

conn.on('end', function() {
conn.end();
Expand All @@ -39,8 +36,6 @@ server.listen(common.PORT, function() {
});
});

var buffer = '';

process.on('exit', function() {
assert.equal(true, got_error);
assert.equal(true, conn_closed);
Expand Down

0 comments on commit eaf40a0

Please sign in to comment.