Skip to content

Commit

Permalink
test,benchmark: fix test-benchmark-zlib
Browse files Browse the repository at this point in the history
PR-URL: nodejs#31538
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
Trott committed Jan 30, 2020
1 parent d65e6a5 commit 5cf789e
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
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
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
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 5cf789e

Please sign in to comment.