Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2022-01-03 07:21:46 +0300
committerDanielle Adams <adamzdanielle@gmail.com>2022-02-01 07:54:42 +0300
commit362f5edf8cfecfbbea6b0e80adbed390ef6f4df4 (patch)
tree2ba12febc06a83784b153fb0b6a78f81235d0c65 /benchmark
parent3ecc964a2918923694ed1181f9adcb82c556af54 (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.js6
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');
}