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 e93a6da

Browse filesBrowse files
apapirovskigibfahn
authored andcommitted
benchmark: fix http/simple.js benchmark
autocannon appears to have trouble recognizing URLs that contain true or false within them. Use 0 or 1 instead to represent the same. PR-URL: #17583 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent b726776 commit e93a6da
Copy full SHA for e93a6da

File tree

Expand file treeCollapse file tree

2 files changed

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

2 files changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎benchmark/fixtures/simple-http-server.js‎

Copy file name to clipboardExpand all lines: benchmark/fixtures/simple-http-server.js
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module.exports = http.createServer(function(req, res) {
3434
const arg = params[2];
3535
const n_chunks = parseInt(params[3], 10);
3636
const resHow = params.length >= 5 ? params[4] : 'normal';
37-
const chunkedEnc = params.length >= 6 && params[5] === 'false' ? false : true;
37+
const chunkedEnc = params.length >= 6 && params[5] === '0' ? false : true;
3838
var status = 200;
3939

4040
var n, i;
Collapse file

‎benchmark/http/simple.js‎

Copy file name to clipboardExpand all lines: benchmark/http/simple.js
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ const bench = common.createBenchmark(main, {
88
len: [4, 1024, 102400],
99
chunks: [1, 4],
1010
c: [50, 500],
11-
chunkedEnc: ['true', 'false'],
11+
chunkedEnc: [1, 0],
1212
res: ['normal', 'setHeader', 'setHeaderWH']
1313
});
1414

1515
function main(conf) {
1616
process.env.PORT = PORT;
1717
var server = require('../fixtures/simple-http-server.js')
18-
.listen(process.env.PORT || common.PORT)
18+
.listen(PORT)
1919
.on('listening', function() {
2020
const path =
2121
`/${conf.type}/${conf.len}/${conf.chunks}/${conf.res}/${conf.chunkedEnc}`;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.