node/test/fixtures/linux-perf.js
Refael Ackermann 546d6cdd9e test,v8: skip less and stabilize test-linux-perf.js
Co-authored-by: Matheus Marchini <mat@mmarchini.me>

PR-URL: https://github.com/nodejs/node/pull/27364
Refs: https://github.com/nodejs/build/issues/1774
Reviewed-By: Matheus Marchini <mat@mmarchini.me>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2019-06-06 18:44:21 -04:00

18 lines
336 B
JavaScript

'use strict';
const { spawnSync } = require("child_process");
const sleepTime = new Number(process.argv[2] || "0.1");
const repeat = new Number(process.argv[3]) || 5;
function functionOne() {
functionTwo();
}
function functionTwo() {
spawnSync('sleep', [`${sleepTime}`]);
}
for (let i = 0; i < repeat; i++) {
functionOne();
}