test,benchmark: fix test-benchmark-zlib

PR-URL: https://github.com/nodejs/node/pull/31538
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
Rich Trott 2020-01-27 07:32:47 -08:00
parent d65e6a5017
commit 5cf789e554
3 changed files with 5 additions and 1 deletions

View File

@ -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;

View File

@ -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;

View File

@ -10,7 +10,7 @@ runBenchmark('zlib',
'chunkLen=1024',
'duration=0.001',
'inputLen=1024',
'method=deflate',
'method=',
'n=1',
'options=true',
'type=Deflate',