• Stars
    star
    5,403
  • Rank 7,625 (Top 0.2 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🔬 A fast, interactive web-based viewer for performance profiles.

English | 简体中文

🔬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 and 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
  • t: Open the profile/thread selector if available
  • Cmd+F/Ctrl+F: to open search. While open, Enter and Shift+Enter cycle through results

Contributing

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

More Repositories

1

chrome2calltree

Convert CPU profiles exported from Chrome to callgrind format
JavaScript
391
star
2

flask_debugtoolbar_lineprofilerpanel

Line Profiler Panel for Flask Debug Toolbar
Python
67
star
3

travelmap

A Map of Everywhere My Family Has Ever Been
JavaScript
56
star
4

metaballs

Associated code for http://jamie-wong.com/2014/08/19/metaballs-and-marching-squares/
JavaScript
48
star
5

fifteen-puzzle

Implementation of Sliding 15 Puzzle with a Solver
CoffeeScript
38
star
6

dotfiles

Dotfiles (mostly vim)
Python
33
star
7

vim-arcanist

Wrapper around arcanist for vim
Vim Script
22
star
8

messenger-to-markdown

Chrome plugin to convert conversations on messenger.com to markdown
JavaScript
19
star
9

1rt

One Round Trip! Based off https://github.com/erikras/react-redux-universal-hot-example
JavaScript
18
star
10

dedistract

Stupid simple site "blocker" Chrome extension.
JavaScript
18
star
11

youtube-for-dancers

Chrome extension for youtube.com offering simple controls for looping, speed, and mirroring
JavaScript
12
star
12

Give-Me-Your-Knowledge

GMYK is a set of talks given for and by Software Engineering students at the University of Waterloo
C
10
star
13

Propositional-Logic-Parser

JavaScript
10
star
14

MarmosetSubmit

Submit to marmoset from the command line
Ruby
9
star
15

Omegle-Voyeur

Watch and interfere with other
PHP
8
star
16

resume

Resume built in haml and markdown
HTML
8
star
17

graphics-experiments

Bucket of unrelated graphics experiments. Just a place to keep stuff so I don't lose it.
TypeScript
7
star
18

UWAngel-CLI

A CLI for UW-ACE/Angel
PHP
6
star
19

gpu-boids

Implementation of flocking behaviour using the GPU via webgl
JavaScript
6
star
20

hvac-sim-app

A library for modeling loads and costs for heat pumps, furnaces, air conditioners etc
TypeScript
5
star
21

GameOfLife

Python
5
star
22

GameOfLifeJS

Just messin around
JavaScript
4
star
23

JSONimal

Elegant DOM construction with jQuery
JavaScript
4
star
24

font-learning

Jupyter Notebook
3
star
25

stardew-valley-save-editor

A really simple proof of concept of editing Stardew Valley save files totally in-browser
TypeScript
3
star
26

ProcMonitor

Monitor and retrieve non-blocking stream output from a process
PHP
3
star
27

Jobmine-Improved

Greasemonkey Upgrade for University of Waterloo Jobmine
JavaScript
3
star
28

tinyrenderer

My implementation of https://github.com/ssloy/tinyrenderer/wiki
C++
3
star
29

1TWorkReport

Simple Blog System for comparison of Fixtures vs Factories
Ruby
2
star
30

Search-Graph

Graph things like this: http://xkcd.com/715/
JavaScript
2
star
31

uw-cs488-vm

Vagrant + Puppet configuration to boot a VM for CS 488
Ruby
2
star
32

UWData-JS-API

A Backbone.js extension for simple interfacing with the uwdata.ca API
JavaScript
1
star
33

phleet.github.com

Vim Script
1
star
34

node-experiment

CoffeeScript
1
star
35

euler_scala

Scala solution to Project Euler solutions for learning and code review
Scala
1
star
36

brunch-with-caffeine

A frameworkless Brunch skeleton all set up with bonus caffeine from CoffeeScript and Mocha.
CSS
1
star
37

sc2_tournament_manager

JavaScript
1
star
38

bear_import_anki_plugin

An Anki Add-on to import natural language prompts from Bear
Python
1
star
39

jquery.atreq

Asynchronous runtime dependency loading for javascript
JavaScript
1
star
40

boggle

JavaScript
1
star