File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -10,14 +10,13 @@ const bench = common.createBenchmark(main, {
10
10
n : [ 5e5 ]
11
11
} ) ;
12
12
13
- function main ( conf ) {
14
- const n = + conf . n ;
15
- const fn = zlib [ `create${ conf . type } ` ] ;
13
+ function main ( { n, type, options } ) {
14
+ const fn = zlib [ `create${ type } ` ] ;
16
15
if ( typeof fn !== 'function' )
17
16
throw new Error ( 'Invalid zlib type' ) ;
18
17
var i = 0 ;
19
18
20
- if ( conf . options === 'true' ) {
19
+ if ( options === 'true' ) {
21
20
const opts = { } ;
22
21
bench . start ( ) ;
23
22
for ( ; i < n ; ++ i )
Original file line number Diff line number Diff line change @@ -8,10 +8,8 @@ const bench = common.createBenchmark(main, {
8
8
n : [ 4e5 ]
9
9
} ) ;
10
10
11
- function main ( conf ) {
12
- const n = + conf . n ;
13
- const method = conf . method ;
14
- const chunk = Buffer . alloc ( + conf . inputLen , 'a' ) ;
11
+ function main ( { n, method, inputLen } ) {
12
+ const chunk = Buffer . alloc ( inputLen , 'a' ) ;
15
13
16
14
var i = 0 ;
17
15
switch ( method ) {
You can’t perform that action at this time.
0 commit comments