aboutsummaryrefslogtreecommitdiff
path: root/benchmark/tls
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-02-24 22:30:10 -0800
committerRich Trott <rtrott@gmail.com>2016-02-27 20:15:17 -0800
commitdcfda1007bb74a8354a47852bebe830a23916b6d (patch)
treec2c21681a7c0fa25bf74c8ecaaa0c19c5a3e6316 /benchmark/tls
parent7fc6645982855ced40bf4af4b002a30b30510ac0 (diff)
downloadandroid-node-v8-dcfda1007bb74a8354a47852bebe830a23916b6d.tar.gz
android-node-v8-dcfda1007bb74a8354a47852bebe830a23916b6d.tar.bz2
android-node-v8-dcfda1007bb74a8354a47852bebe830a23916b6d.zip
tools,benchmark: increase lint compliance
In the hopes of soon having the benchmark code linted, this change groups all the likely non-controversial lint-compliance changes such as indentation, semi-colon usage, and single-vs.-double quotation marks. Other lint rules may have subtle performance implications in the V8 currently shipped with Node.js. Those changes will require more careful review and will be in a separate change. PR-URL: https://github.com/nodejs/node/pull/5429 Reviewed-By: Roman Reiss <me@silverwind.io> Reviewed-By: Brian White <mscdex@mscdex.net>
Diffstat (limited to 'benchmark/tls')
-rw-r--r--benchmark/tls/throughput.js3
-rw-r--r--benchmark/tls/tls-connect.js15
2 files changed, 8 insertions, 10 deletions
diff --git a/benchmark/tls/throughput.js b/benchmark/tls/throughput.js
index 2e1147cdf9..cbc5ffc0fb 100644
--- a/benchmark/tls/throughput.js
+++ b/benchmark/tls/throughput.js
@@ -31,7 +31,7 @@ function main(conf) {
encoding = 'ascii';
break;
case 'utf':
- chunk = new Array(size/2 + 1).join('ü');
+ chunk = new Array(size / 2 + 1).join('ü');
encoding = 'utf8';
break;
default:
@@ -54,7 +54,6 @@ function main(conf) {
});
function write() {
- var i = 0;
while (false !== conn.write(chunk, encoding));
}
});
diff --git a/benchmark/tls/tls-connect.js b/benchmark/tls/tls-connect.js
index 0dd20e1fd2..a265989e04 100644
--- a/benchmark/tls/tls-connect.js
+++ b/benchmark/tls/tls-connect.js
@@ -1,8 +1,7 @@
'use strict';
-var assert = require('assert'),
- fs = require('fs'),
- path = require('path'),
- tls = require('tls');
+var fs = require('fs'),
+ path = require('path'),
+ tls = require('tls');
var common = require('../common.js');
var bench = common.createBenchmark(main, {
@@ -22,10 +21,10 @@ function main(conf) {
concurrency = +conf.concurrency;
var cert_dir = path.resolve(__dirname, '../../test/fixtures'),
- options = { key: fs.readFileSync(cert_dir + '/test_key.pem'),
- cert: fs.readFileSync(cert_dir + '/test_cert.pem'),
- ca: [ fs.readFileSync(cert_dir + '/test_ca.pem') ],
- ciphers: 'AES256-GCM-SHA384' };
+ options = { key: fs.readFileSync(cert_dir + '/test_key.pem'),
+ cert: fs.readFileSync(cert_dir + '/test_cert.pem'),
+ ca: [ fs.readFileSync(cert_dir + '/test_ca.pem') ],
+ ciphers: 'AES256-GCM-SHA384' };
server = tls.createServer(options, onConnection);
server.listen(common.PORT, onListening);