| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -450,9 +450,8 @@ Windows and `30` elsewhere. | |||
| 450 | 450 | ||
| 451 | 451 | Returns an array of all `.cpuprofile` files found in `dir`. | |
| 452 | 452 | ||
| 453 | - ### getFrames(output, file, suffix) | ||
| 453 | + ### getFrames(file, suffix) | ||
| 454 | 454 | ||
| 455 | - * `output` Unused. | ||
| 456 | 455 | * `file` {string} Path to a `.cpuprofile` file. | |
| 457 | 456 | * `suffix` {string} Suffix of the URL of call frames to retrieve. | |
| 458 | 457 | * returns { frames: [<Object>], nodes: [<Object>] } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,7 +14,7 @@ function getCpuProfiles(dir) { | |||
| 14 | 14 | .map((file) => path.join(dir, file)); | |
| 15 | 15 | } | |
| 16 | 16 | ||
| 17 | - function getFrames(output, file, suffix) { | ||
| 17 | + function getFrames(file, suffix) { | ||
| 18 | 18 | const data = fs.readFileSync(file, 'utf8'); | |
| 19 | 19 | const profile = JSON.parse(data); | |
| 20 | 20 | const frames = profile.nodes.filter((i) => { | |
@@ -25,7 +25,7 @@ function getFrames(output, file, suffix) { | |||
| 25 | 25 | } | |
| 26 | 26 | ||
| 27 | 27 | function verifyFrames(output, file, suffix) { | |
| 28 | - const { frames, nodes } = getFrames(output, file, suffix); | ||
| 28 | + const { frames, nodes } = getFrames(file, suffix); | ||
| 29 | 29 | if (frames.length === 0) { | |
| 30 | 30 | // Show native debug output and the profile for debugging. | |
| 31 | 31 | console.log(output.stderr.toString()); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -41,8 +41,8 @@ const { | |||
| 41 | 41 | assert(fs.existsSync(dir)); | |
| 42 | 42 | const profiles = getCpuProfiles(dir); | |
| 43 | 43 | assert.strictEqual(profiles.length, 2); | |
| 44 | - const profile1 = getFrames(output, profiles[0], 'fibonacci.js'); | ||
| 45 | - const profile2 = getFrames(output, profiles[1], 'fibonacci.js'); | ||
| 44 | + const profile1 = getFrames(profiles[0], 'fibonacci.js'); | ||
| 45 | + const profile2 = getFrames(profiles[1], 'fibonacci.js'); | ||
| 46 | 46 | if (profile1.frames.length === 0 && profile2.frames.length === 0) { | |
| 47 | 47 | // Show native debug output and the profile for debugging. | |
| 48 | 48 | console.log(output.stderr.toString()); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments