Skip to content

Commit

Permalink
test,benchmark: fix test-benchmark-zlib
Browse files Browse the repository at this point in the history
PR-URL: #31538
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott authored and codebytere committed Feb 17, 2020
1 parent 43186e0 commit 4152428
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions benchmark/zlib/deflate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const bench = common.createBenchmark(main, {
});

function main({ n, method, inputLen }) {
// Default method value for testing.
method = method || 'deflate';
const chunk = Buffer.alloc(inputLen, 'a');

var i = 0;
Expand Down
2 changes: 2 additions & 0 deletions benchmark/zlib/inflate.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ const bench = common.createBenchmark(main, {
});

function main({ n, method, inputLen }) {
// Default method value for tests.
method = method || 'inflate';
const chunk = zlib.deflateSync(Buffer.alloc(inputLen, 'a'));

let i = 0;
Expand Down
2 changes: 1 addition & 1 deletion test/benchmark/test-benchmark-zlib.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ runBenchmark('zlib',
'chunkLen=1024',
'duration=0.001',
'inputLen=1024',
'method=deflate',
'method=',
'n=1',
'options=true',
'type=Deflate',
Expand Down

0 comments on commit 4152428

Please sign in to comment.