GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — benchmark: use let instead of var in tls · nodejs/node@108e91f

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • benchmark/tls
    • convertprotocols.js
    • throughput.js
    • tls-connect.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎benchmark/tls/convertprotocols.js‎

Copy file name to clipboardExpand all lines: benchmark/tls/convertprotocols.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const bench = common.createBenchmark(main, {
99

1010
function main({ n }) {
1111
const input = ['ABC', 'XYZ123', 'FOO'];
12-
var m = {};
12+
let m = {};
1313
// First call dominates results
1414
if (n > 1) {
1515
tls.convertALPNProtocols(input, m);
Collapse file

‎benchmark/tls/throughput.js‎

Copy file name to clipboardExpand all lines: benchmark/tls/throughput.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ const bench = common.createBenchmark(main, {
77
});
88

99
const fixtures = require('../../test/common/fixtures');
10-
var options;
10+
let options;
1111
const tls = require('tls');
1212

1313
function main({ dur, type, size }) {
14-
var encoding;
15-
var chunk;
14+
let encoding;
15+
let chunk;
1616
switch (type) {
1717
case 'buf':
1818
chunk = Buffer.alloc(size, 'b');
@@ -37,7 +37,7 @@ function main({ dur, type, size }) {
3737
};
3838

3939
const server = tls.createServer(options, onConnection);
40-
var conn;
40+
let conn;
4141
server.listen(common.PORT, () => {
4242
const opt = { port: common.PORT, rejectUnauthorized: false };
4343
conn = tls.connect(opt, () => {
@@ -52,7 +52,7 @@ function main({ dur, type, size }) {
5252
}
5353
});
5454

55-
var received = 0;
55+
let received = 0;
5656
function onConnection(conn) {
5757
conn.on('data', (chunk) => {
5858
received += chunk.length;
Collapse file

‎benchmark/tls/tls-connect.js‎

Copy file name to clipboardExpand all lines: benchmark/tls/tls-connect.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ const bench = common.createBenchmark(main, {
88
dur: [5]
99
});
1010

11-
var clientConn = 0;
12-
var serverConn = 0;
13-
var dur;
14-
var concurrency;
15-
var running = true;
11+
let clientConn = 0;
12+
let serverConn = 0;
13+
let dur;
14+
let concurrency;
15+
let running = true;
1616

1717
function main(conf) {
1818
dur = conf.dur;

0 commit comments

Comments
0 (0)
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.