diff --git a/test/common/README.md b/test/common/README.md index a60a60ce206c89..1f47baf7a8593f 100644 --- a/test/common/README.md +++ b/test/common/README.md @@ -450,9 +450,8 @@ Windows and `30` elsewhere. Returns an array of all `.cpuprofile` files found in `dir`. -### getFrames(output, file, suffix) +### getFrames(file, suffix) -* `output` Unused. * `file` {string} Path to a `.cpuprofile` file. * `suffix` {string} Suffix of the URL of call frames to retrieve. * returns { frames: [<Object>], nodes: [<Object>] } diff --git a/test/common/cpu-prof.js b/test/common/cpu-prof.js index 78e746082b4990..8e8bd42275b7d8 100644 --- a/test/common/cpu-prof.js +++ b/test/common/cpu-prof.js @@ -14,7 +14,7 @@ function getCpuProfiles(dir) { .map((file) => path.join(dir, file)); } -function getFrames(output, file, suffix) { +function getFrames(file, suffix) { const data = fs.readFileSync(file, 'utf8'); const profile = JSON.parse(data); const frames = profile.nodes.filter((i) => { @@ -25,7 +25,7 @@ function getFrames(output, file, suffix) { } function verifyFrames(output, file, suffix) { - const { frames, nodes } = getFrames(output, file, suffix); + const { frames, nodes } = getFrames(file, suffix); if (frames.length === 0) { // Show native debug output and the profile for debugging. console.log(output.stderr.toString()); diff --git a/test/parallel/test-cpu-prof-dir-worker.js b/test/parallel/test-cpu-prof-dir-worker.js index d382088ca7286b..fe72af7416d813 100644 --- a/test/parallel/test-cpu-prof-dir-worker.js +++ b/test/parallel/test-cpu-prof-dir-worker.js @@ -41,8 +41,8 @@ const { assert(fs.existsSync(dir)); const profiles = getCpuProfiles(dir); assert.strictEqual(profiles.length, 2); - const profile1 = getFrames(output, profiles[0], 'fibonacci.js'); - const profile2 = getFrames(output, profiles[1], 'fibonacci.js'); + const profile1 = getFrames(profiles[0], 'fibonacci.js'); + const profile2 = getFrames(profiles[1], 'fibonacci.js'); if (profile1.frames.length === 0 && profile2.frames.length === 0) { // Show native debug output and the profile for debugging. console.log(output.stderr.toString());