🔬 A fast, interactive web-based viewer for performance profiles.
Go to file
Jamie Wong c9ba143eb6 1.0.3
2018-09-10 13:54:32 -07:00
.vscode Add a hotkey to flatten recursion (#68) 2018-06-21 13:56:58 -07:00
assets Reorganize directory structure (#104) 2018-08-01 00:41:45 -07:00
bin 0.5.1 2018-08-11 22:05:39 -07:00
sample Fix import for Chrome 69, support leading idle time before first call (#160) 2018-09-09 18:00:30 -07:00
scripts Run unit tests as part of release build 2018-09-04 20:53:58 -07:00
src Add test for Chrome 69 import 2018-09-09 18:03:49 -07:00
.eslintrc.js Set up Prettier and run it on the whole codebase 2018-04-14 08:40:06 -07:00
.gitignore Add a CLI to load the target file in your default browser (#88) 2018-07-07 21:33:02 -07:00
.travis.yml Set up Prettier and run it on the whole codebase 2018-04-14 08:40:06 -07:00
CHANGELOG.md 1.0.3 2018-09-10 13:54:32 -07:00
CODE_OF_CONDUCT.md Add contributor guidelines & documentation (#144) 2018-08-20 09:42:44 -07:00
CONTRIBUTING.md Add contributor guidelines & documentation (#144) 2018-08-20 09:42:44 -07:00
LICENSE Add MIT License 2018-04-08 22:35:53 -07:00
package-lock.json Replace regl with GPU apis ported from evanw/sky (#140) 2018-08-19 11:37:47 -07:00
package.json 1.0.3 2018-09-10 13:54:32 -07:00
prettier.config.js Address review comments 2018-04-14 16:19:26 -07:00
README-ADMINS.md Change deploy script to use assets from npm 2018-09-04 20:50:30 -07:00
README.md Update README.md 2018-08-23 09:22:24 -07:00
tsconfig.json Fix existing code splitting & code split profile importers into their own chunk (#79) 2018-06-30 17:26:28 -07:00

🔬speedscope

A fast, interactive web-based viewer for performance profiles. An alternative viewer for FlameGraphs. Will happily display multi-megabyte profiles without crashing your browser.

Given raw profiling data, speedscope allows you to interactively explore the data to get insight into what's slow in your application, or allocating all the memory, or whatever data is represented in the profiling data.

Example Profile

Usage

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:

npm install -g speedscope

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.

Contributions to add support for additional formats are welcome! See issues with the "import source" tag.

Importing via URL

To load a specific profile by URL, you can append a hash fragment like #profileURL=[URL-encoded profile URL]&title=[URL-encoded custom title]. Note that the server hosting the profile must have CORS configured to allow AJAX requests from speedscope.

Views

🕰Time Order

Detail View

In the "Time Order" view (the default), call stacks are ordered left-to-right in the same order as they occurred in the input file, which is usually going to be the chronological order they were recorded in. This view is most helpful for understanding the behavior of an application over time, e.g. "first the data is fetched from the database, then the data is prepared for serialization, then the data is serialized to JSON".

The horizontal axis represents the "weight" of each stack (most commonly CPU time), and the vertical axis shows you the stack active at the time of the sample. If you click on one of the frames, you'll be able to see summary statistics about it.

⬅️Left Heavy

Left Heavy View

In the "Left Heavy" view, identical stacks are grouped together, regardless of whether they were recorded sequentially. Then, the stacks are sorted so that the heaviest stack for each parent is on the left -- hence "left heavy". This view is useful for understanding where all the time is going in situations where there are hundreds or thousands of function calls interleaved between other call stacks.

🥪 Sandwich

Sandwich View

The Sandwich view is a table view in which you can find a list of all functions an their associated times. You can sort by self time or total time. It's called "Sandwich" view because if you select one of the rows in the table, you can see flamegraphs for all the callers and callees of the selected row.

Navigation

Once a profile has loaded, the main view is split into two: the top area is the "minimap", and the bottom area is the "stack view".

Minimap Navigation

  • Scroll on either axis to pan around
  • Click and drag to narrow your view to a specific range

Stack View Navigation

  • Scroll on either axis to pan around
  • Pinch to zoom
  • Hold Cmd+Scroll to zoom
  • Double click on a frame to fit the viewport to it
  • Click on a frame to view summary statistics about it

Keyboard Navigation

  • +: zoom in
  • -: zoom out
  • 0: zoom out to see the entire profile
  • w/a/s/d or arrow keys: pan around the profile
  • 1: Switch to the "Time Order" view
  • 2: Switch to the "Left Heavy" view
  • 3: Switch to the "Sandwich" view
  • r: Collapse recursion in the flamegraphs
  • Cmd+S/Ctrl+S to save the current profile
  • Cmd+O/Ctrl+O to open a new profile
  • n: Go to next profile/thread if one is available
  • p: Go to previous profile/thread if one is available

Contributing

Do you want to contribute to speedscope? Sweeeeet. Check out CONTRIBUTING.md for instructions on setting up your dev environment.