From 0f69f40af004f4c173945b807c43ef55899855c8 Mon Sep 17 00:00:00 2001 From: Vse Mozhet Byt Date: Tue, 11 Apr 2017 00:30:24 +0300 Subject: benchmark: replace more [].join() with ''.repeat() Refs: https://github.com/nodejs/node/pull/12170 PR-URL: https://github.com/nodejs/node/pull/12317 Reviewed-By: James M Snell --- benchmark/child_process/child-process-read.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'benchmark/child_process') diff --git a/benchmark/child_process/child-process-read.js b/benchmark/child_process/child-process-read.js index b0128eb796..6fce35410e 100644 --- a/benchmark/child_process/child-process-read.js +++ b/benchmark/child_process/child-process-read.js @@ -19,7 +19,7 @@ function main(conf) { const dur = +conf.dur; const len = +conf.len; - const msg = '"' + Array(len).join('.') + '"'; + const msg = `"${'.'.repeat(len)}"`; const options = { 'stdio': ['ignore', 'pipe', 'ignore'] }; const child = spawn('yes', [msg], options); -- cgit v1.2.3