mirror of
https://github.com/jlfwong/speedscope.git
synced 2024-11-25 20:51:51 +03:00
Add a way of generating a self-contained zip-file
This commit is contained in:
parent
3193b34c46
commit
a5c3184880
@ -8,6 +8,7 @@ Publishing speedscope is a multi-step process:
|
||||
2. Prepare the release
|
||||
3. Publish to npm
|
||||
4. Deploy the website
|
||||
5. Upload a release to GitHub
|
||||
|
||||
At time of writing, deployment assumes you're running macOS. It probably
|
||||
works if you're on a linux, and almost definitely does not work on Windows.
|
||||
@ -54,7 +55,7 @@ a matter of running `npm publish`.
|
||||
|
||||
To verify that the publish was successful, run `npm install -g speedscope`.
|
||||
Try `speedscope`, which should open speedscope in browser.
|
||||
Try `speedscope sample/profiles/stackcollapse/simple.txt`, which should immediately load the profile
|
||||
Try `speedscope sample/profiles/stackcollapse/simple.txt`, which should immediately load the profile.
|
||||
|
||||
## Deploying the website
|
||||
|
||||
@ -76,3 +77,12 @@ If everything looks good, type `yes` then enter. This will commit to the `gh-pag
|
||||
|
||||
To check if a deploy has happened, you can check https://www.speedscope.app/release.txt
|
||||
which includes the version, the date, and the commit of the deploy.
|
||||
|
||||
## Upload a release to GitHub
|
||||
|
||||
To make a zipfile suitable for uploading to GitHub as a release, run prepare-zip-file.sh. Note that this step must follow the "Publish to npm" step,
|
||||
since it uses assets from the npm publish.
|
||||
|
||||
Once that's done, you should have a zip file in `dist/release/`
|
||||
|
||||
Upload that file along with changelog notes to https://github.com/jlfwong/speedscope/releases/new
|
||||
|
@ -13,6 +13,8 @@ Given raw profiling data, speedscope allows you to interactively explore the dat
|
||||
|
||||
Visit https://www.speedscope.app, then either browse to find a profile file or drag-and-drop one onto the page. The profiles are not uploaded anywhere -- the application is totally in-browser.
|
||||
|
||||
## Command line usage
|
||||
|
||||
For offline use, or convenience in the terminal, you can also install speedscope
|
||||
via npm:
|
||||
|
||||
@ -20,6 +22,13 @@ via npm:
|
||||
|
||||
Invoking `speedscope /path/to/profile` will load speedscope in your default browser.
|
||||
|
||||
## Self-contained directory
|
||||
|
||||
If you don't have npm or node installed, you can also download a
|
||||
self-contained version from https://github.com/jlfwong/speedscope/releases.
|
||||
After you download the zip file from a release, simply unzip it and open the
|
||||
contained `index.html` in Chrome or Firefox.
|
||||
|
||||
## Supported file formats
|
||||
|
||||
speedscope is designed to ingest profiles from a variety of different profilers for different programming languages & environments. Click the links below for documentation on how to import from a specific source.
|
||||
|
34
scripts/prepare-zip-file.sh
Executable file
34
scripts/prepare-zip-file.sh
Executable file
@ -0,0 +1,34 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Prepare a mock installation of speedscope to test it before the actual npm
|
||||
# publish
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
SRCDIR=`pwd`
|
||||
TMPDIR=`mktemp -d -t speedscope-test-installation`
|
||||
|
||||
# Untar the package
|
||||
pushd "$TMPDIR"
|
||||
PACKEDNAME=`npm pack speedscope | tail -n1`
|
||||
tar -xvvf "$PACKEDNAME"
|
||||
|
||||
# Zip the parts we care about
|
||||
ZIPNAME=`basename $PACKEDNAME .tgz`.zip
|
||||
mkdir speedscope
|
||||
mv package/dist/release/** speedscope
|
||||
cp "$SRCDIR"/LICENSE speedscope
|
||||
echo "This is a self-contained release of https://github.com/jlfwong/speedscope." > speedscope/README
|
||||
echo "To use it, open index.html in Chrome or Firefox." >> speedscope/README
|
||||
|
||||
zip "$ZIPNAME" speedscope/**
|
||||
|
||||
# Switch back to the repository root
|
||||
popd
|
||||
mv "$TMPDIR"/"$ZIPNAME" dist/release/"$ZIPNAME"
|
||||
|
||||
# Clean up
|
||||
rm -rf "$TMPDIR"
|
||||
|
||||
set +x
|
||||
echo "Created dist/release/$ZIPNAME"
|
Loading…
Reference in New Issue
Block a user