summaryrefslogtreecommitdiff
path: root/benchmark/net/tcp-raw-s2c.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2019-02-04 22:06:08 -0800
committerRich Trott <rtrott@gmail.com>2019-02-06 22:18:31 -0800
commit29e74d4952b772f7f1bf51e1a8f1665bbbde39d1 (patch)
tree211a7131ae8f0fa7d8d5f65422cd53ad0741de33 /benchmark/net/tcp-raw-s2c.js
parentd310d8df62f9c05d07e68c4177f225e9dda72271 (diff)
downloadandroid-node-v8-29e74d4952b772f7f1bf51e1a8f1665bbbde39d1.tar.gz
android-node-v8-29e74d4952b772f7f1bf51e1a8f1665bbbde39d1.tar.bz2
android-node-v8-29e74d4952b772f7f1bf51e1a8f1665bbbde39d1.zip
benchmark: refactor for consistent style
Code in benchmark directory sometimes uses `function () {}` for anonymous callbacks and sometimes uses `() => {}`. Multi-line arrays sometimes have a trailing comma and sometimes do not. Update to always use arrow functions for anonymous callbacks and trailing commas for multiline arrays. PR-URL: https://github.com/nodejs/node/pull/25944 Reviewed-By: Anto Aravinth <anto.aravinth.cse@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/net/tcp-raw-s2c.js')
-rw-r--r--benchmark/net/tcp-raw-s2c.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/net/tcp-raw-s2c.js b/benchmark/net/tcp-raw-s2c.js
index 4dd1ad6ee8..d34434a3d0 100644
--- a/benchmark/net/tcp-raw-s2c.js
+++ b/benchmark/net/tcp-raw-s2c.js
@@ -78,7 +78,7 @@ function main({ dur, len, type }) {
if (err) {
fail(err, 'write');
} else if (!writeReq.async) {
- process.nextTick(function() {
+ process.nextTick(() => {
afterWrite(0, clientHandle);
});
}
@@ -125,7 +125,7 @@ function main({ dur, len, type }) {
// the meat of the benchmark is right here:
bench.start();
- setTimeout(function() {
+ setTimeout(() => {
// report in Gb/sec
bench.end((bytes * 8) / (1024 * 1024 * 1024));
process.exit(0);