mirror of
https://github.com/jlfwong/speedscope.git
synced 2024-11-26 07:35:55 +03:00
3172e61f05
This PR add a CLI speedscope which load file given as an argument in your default browser. Expected usage looks like: ``` speedscope /path/to/profile ``` Note that since we're using base64 encoded strings as a transport for this, this won't work with multi-file profiles, like the Instruments .trace files. This could be augmented to support that by archiving the contents, but that can be handled in a different PR. This PR also set up a viable model for integrating speedscope into other projects. By replicating the contents of `cli.js` in other languages, integration should be possible in other languages with no dependency upon node in any way. Distribution should consist of just HTML, JS, and CSS assets to be loaded in browser. Test Plan: - Ran the following to simulate a publish & subsequent installation: ``` $ npm pack $ mv speedscope-0.1.0.tgz /tmp/ $ cd /tmp $ tar -xvvf speedscope-0.1.0.tgz $ cd package $ npm install --only=production $ ./cli.js Opening file:///private/tmp/package/dist/release/index.html in your default browser $ ./cli.js ~/code/speedscope/sample/profiles/Chrome/65/timeline.json Creating temp file /var/folders/l0/qtd9z14973s2tw81vmzwkyp00000gp/T/speedscope-1531023992823-3880.js Creating temp file /var/folders/l0/qtd9z14973s2tw81vmzwkyp00000gp/T/speedscope-1531023992823-3880.html Opening file:///var/folders/l0/qtd9z14973s2tw81vmzwkyp00000gp/T/speedscope-1531023992823-3880.html in your default browser ``` Fixes #24
5 lines
39 B
Plaintext
5 lines
39 B
Plaintext
node_modules
|
|
.cache
|
|
dist
|
|
.idea
|
|
coverage |