From 5b0daafd48dd732743e737cc22c8136d8cc85a0d Mon Sep 17 00:00:00 2001 From: ka2jun8 Date: Sat, 24 Nov 2018 16:40:56 +0900 Subject: [PATCH] doc: replace anonymous function with arrow function PR-URL: https://github.com/nodejs/node/pull/24617 Reviewed-By: Anna Henningsen Reviewed-By: Yuta Hiroto Reviewed-By: Gireesh Punathil Reviewed-By: Vse Mozhet Byt --- doc/guides/writing-and-running-benchmarks.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/guides/writing-and-running-benchmarks.md b/doc/guides/writing-and-running-benchmarks.md index b6f8984afff029..693107f4c22668 100644 --- a/doc/guides/writing-and-running-benchmarks.md +++ b/doc/guides/writing-and-running-benchmarks.md @@ -444,14 +444,14 @@ function main(conf) { const http = require('http'); const len = conf.kb * 1024; const chunk = Buffer.alloc(len, 'x'); - const server = http.createServer(function(req, res) { + const server = http.createServer((req, res) => { res.end(chunk); }); - server.listen(common.PORT, function() { + server.listen(common.PORT, () => { bench.http({ connections: conf.connections, - }, function() { + }, () => { server.close(); }); });