jlfwong / jlfwong/speedscope

Feature request: Import speedscope to open profiles

Open
#334 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.8k
Forks
320
PR merge metrics
No merged PRs in 30d

Description

So currently, the only way to import profiles with the speedscope package (as in, programatically and not through uploading to the website) is to first install the `speedscope` package globally and then running from the command line with `speedscope [profile-location]`. However, this makes it difficult to integrate `speedscope` with other tools, requiring spawning a subcommand and hoping the person running it has `speedscope` installed.

Is it possible to expose that same functionality from the module so that people can just `import speedscope from 'speedscope'` in their Node code and then be able to do something like `speedscope('profile-location.cpuprofile')` to auto-open the profile?

Context: I'm writing a CLI that retrieves a CPU profile (that was generated on a different server) to save and then open locally using `speedscope`. Thing is, I can't expect the end user to have `speedscope` already installed, and it would be much easier to just include `speedscope` as a dependency in the `package.json` and then call `speedscope` from the code rather than having to spawn a separate process.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.