diff options
author | Rich Trott <rtrott@gmail.com> | 2022-01-03 07:21:46 +0300 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2022-01-05 18:42:19 +0300 |
commit | 55ceaec111e5b62af1e798b33fa8a3e8abd7f057 (patch) | |
tree | 9154d9309d1489d6eb76de2bed4a2a7316181754 /benchmark | |
parent | e7d4e6b680b6c2a0b0bd5a0e61f7abbe90617044 (diff) |
tools,benchmark,lib,test: enable no-case-declarations lint rule
PR-URL: https://github.com/nodejs/node/pull/41385
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Ricky Zhou <0x19951125@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r-- | benchmark/zlib/inflate.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/benchmark/zlib/inflate.js b/benchmark/zlib/inflate.js index 09379c00c12..e4642b39446 100644 --- a/benchmark/zlib/inflate.js +++ b/benchmark/zlib/inflate.js @@ -16,7 +16,7 @@ function main({ n, method, inputLen }) { let i = 0; switch (method) { // Performs `n` single inflate operations - case 'inflate': + case 'inflate': { const inflate = zlib.inflate; bench.start(); (function next(err, result) { @@ -25,14 +25,16 @@ function main({ n, method, inputLen }) { inflate(chunk, next); })(); break; + } // Performs `n` single inflateSync operations - case 'inflateSync': + case 'inflateSync': { const inflateSync = zlib.inflateSync; bench.start(); for (; i < n; ++i) inflateSync(chunk); bench.end(n); break; + } default: throw new Error('Unsupported inflate method'); } |