summaryrefslogtreecommitdiff
path: root/benchmark
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-11-27 22:56:21 -0800
committerRich Trott <rtrott@gmail.com>2019-11-30 06:28:29 -0800
commit359766b2c3f686fe4ebe5cd6bc4e99280e09b450 (patch)
tree7b62141573f19ce6f1e82392f12732cabda30710 /benchmark
parent2070d3f8eb14ca9cc5c2e23824b20d700d7183be (diff)
downloadandroid-node-v8-359766b2c3f686fe4ebe5cd6bc4e99280e09b450.tar.gz
android-node-v8-359766b2c3f686fe4ebe5cd6bc4e99280e09b450.tar.bz2
android-node-v8-359766b2c3f686fe4ebe5cd6bc4e99280e09b450.zip
benchmark,doc,lib,test: prepare for padding lint rule
Upcoming lint rule will require a blank line between consecutive functions. Add it in the places where we don't have it already. PR-URL: https://github.com/nodejs/node/pull/30696 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Denys Otrishko <shishugi@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/process/next-tick-breadth-args.js3
-rw-r--r--benchmark/process/next-tick-depth-args.js3
-rw-r--r--benchmark/timers/set-immediate-breadth-args.js2
-rw-r--r--benchmark/timers/set-immediate-depth-args.js2
-rw-r--r--benchmark/timers/timers-breadth-args.js3
-rw-r--r--benchmark/timers/timers-timeout-nexttick.js2
-rw-r--r--benchmark/timers/timers-timeout-pooled.js1
-rw-r--r--benchmark/timers/timers-timeout-unpooled.js1
8 files changed, 17 insertions, 0 deletions
diff --git a/benchmark/process/next-tick-breadth-args.js b/benchmark/process/next-tick-breadth-args.js
index f7f9882c87..03651dbdbb 100644
--- a/benchmark/process/next-tick-breadth-args.js
+++ b/benchmark/process/next-tick-breadth-args.js
@@ -13,16 +13,19 @@ function main({ n }) {
if (j === n)
bench.end(n);
}
+
function cb2(arg1, arg2) {
j++;
if (j === n)
bench.end(n);
}
+
function cb3(arg1, arg2, arg3) {
j++;
if (j === n)
bench.end(n);
}
+
function cb4(arg1, arg2, arg3, arg4) {
j++;
if (j === n)
diff --git a/benchmark/process/next-tick-depth-args.js b/benchmark/process/next-tick-depth-args.js
index d9fc37887e..7c6b2346fd 100644
--- a/benchmark/process/next-tick-depth-args.js
+++ b/benchmark/process/next-tick-depth-args.js
@@ -20,6 +20,7 @@ function main({ n }) {
} else
bench.end(n);
}
+
function cb3(arg1, arg2, arg3) {
if (--counter) {
if (counter % 4 === 0)
@@ -33,6 +34,7 @@ function main({ n }) {
} else
bench.end(n);
}
+
function cb2(arg1, arg2) {
if (--counter) {
if (counter % 4 === 0)
@@ -46,6 +48,7 @@ function main({ n }) {
} else
bench.end(n);
}
+
function cb1(arg1) {
if (--counter) {
if (counter % 4 === 0)
diff --git a/benchmark/timers/set-immediate-breadth-args.js b/benchmark/timers/set-immediate-breadth-args.js
index 518ed90e58..6d556f9186 100644
--- a/benchmark/timers/set-immediate-breadth-args.js
+++ b/benchmark/timers/set-immediate-breadth-args.js
@@ -12,7 +12,9 @@ function main({ n }) {
});
function cb1(arg1) {}
+
function cb2(arg1, arg2) {}
+
function cb3(arg1, arg2, arg3) {}
bench.start();
diff --git a/benchmark/timers/set-immediate-depth-args.js b/benchmark/timers/set-immediate-depth-args.js
index d8eb5c409a..a01a400d5f 100644
--- a/benchmark/timers/set-immediate-depth-args.js
+++ b/benchmark/timers/set-immediate-depth-args.js
@@ -21,6 +21,7 @@ function main({ n }) {
setImmediate(cb1, n);
}
}
+
function cb2(n, arg2) {
if (--n) {
if (n % 3 === 0)
@@ -31,6 +32,7 @@ function main({ n }) {
setImmediate(cb1, n);
}
}
+
function cb1(n) {
if (--n) {
if (n % 3 === 0)
diff --git a/benchmark/timers/timers-breadth-args.js b/benchmark/timers/timers-breadth-args.js
index 5f91603caa..bdb3adbbec 100644
--- a/benchmark/timers/timers-breadth-args.js
+++ b/benchmark/timers/timers-breadth-args.js
@@ -12,16 +12,19 @@ function main({ n }) {
if (j === n)
bench.end(n);
}
+
function cb2(arg1, arg2) {
j++;
if (j === n)
bench.end(n);
}
+
function cb3(arg1, arg2, arg3) {
j++;
if (j === n)
bench.end(n);
}
+
function cb4(arg1, arg2, arg3, arg4) {
j++;
if (j === n)
diff --git a/benchmark/timers/timers-timeout-nexttick.js b/benchmark/timers/timers-timeout-nexttick.js
index 781e505ae4..638d8aec14 100644
--- a/benchmark/timers/timers-timeout-nexttick.js
+++ b/benchmark/timers/timers-timeout-nexttick.js
@@ -19,9 +19,11 @@ function main({ n }) {
function cb() {
process.nextTick(counter);
}
+
function cb2() {
process.nextTick(counter);
}
+
function counter() {
count++;
if (count === n)
diff --git a/benchmark/timers/timers-timeout-pooled.js b/benchmark/timers/timers-timeout-pooled.js
index d34080fa66..1cdae07dc9 100644
--- a/benchmark/timers/timers-timeout-pooled.js
+++ b/benchmark/timers/timers-timeout-pooled.js
@@ -20,6 +20,7 @@ function main({ n }) {
if (count === n)
bench.end(n);
}
+
function cb2() {
count++;
if (count === n)
diff --git a/benchmark/timers/timers-timeout-unpooled.js b/benchmark/timers/timers-timeout-unpooled.js
index 19f0f6a4af..fecb73a360 100644
--- a/benchmark/timers/timers-timeout-unpooled.js
+++ b/benchmark/timers/timers-timeout-unpooled.js
@@ -20,6 +20,7 @@ function main({ n }) {
if (count === n)
bench.end(n);
}
+
function cb2() {
count++;
if (count === n)