Commit Graph

26 Commits

Author SHA1 Message Date
Jamie Wong
d659eb0159
Add a hotkey to flatten recursion (#68)
This makes the left-heavy view much more useful since recursive calls are all collapsed together.

Press `r` to activate

Fixes #37
2018-06-21 13:56:58 -07:00
Jamie Wong
7846cce806
Introduce a simple table view (#59)
This is a pretty barebones table view. Eventually I'd like this to provide some better way of identifying problem areas by seeing flamegraphs of all callers and all callees, but this is better than nothing.

![image](https://user-images.githubusercontent.com/150329/41460197-b4f6f0dc-7040-11e8-9390-69bb460bd8f1.png)
2018-06-18 12:11:04 -07:00
Jamie Wong
2207ff54ce
Add tests for importers (#56)
This also fixes deep copy import for Instruments when copying from Instruments 7

Related to #14
2018-05-29 23:53:03 -07:00
Jamie Wong
405e751bbb
Add tests for Profile and value formatters (#54)
* Split profile building APIs into dedicated classes

* Split value formatters into their own file

* Add tests for formatters

* Add test for StackListProfileBuilder

* Add test for CallTreeProfileBuilder
2018-05-29 20:02:02 -07:00
Jamie Wong
756a3ff5ac
Fixes for details view (#44)
This contains 2 fixes for the details view
The first is that the padding in the scrolling view was causing the last frame to be clipped
The second is that we were uselessly displaying "(speedscope root)" in the stack trace view.

This also removes some sketch specific stuff from the keyed archive expanding code

Fixes #32
2018-05-20 14:42:16 -07:00
Jamie Wong
2b9f7ffe1b
Support importing from instruments via deep copy (#33)
Instruments has a complex binary file format. If we're interested in just having a nice flamegraph display of the contents and don't care too much about time ordering or symbol file locations, then we can just grab the information we need from the clipboard rather than deal with the binary file format. This also avoids needing to deal with multiple processes or multiple threads.

This PR contains 2 compressed `.trace` files. In each, if you select the top row in the call tree view and hit "Cmd+Shift+C" or go to "Edit -> Deep Copy", then paste into speedscope, you should get the corresponding flamechart.

## Allocations Profile

![image](https://user-images.githubusercontent.com/150329/39796943-5d900c88-530e-11e8-8dea-fa0a44888a64.png)

![image](https://user-images.githubusercontent.com/150329/39796949-65f6a9f4-530e-11e8-8509-64816cebe74c.png)

## Time Profile

![image](https://user-images.githubusercontent.com/150329/39796956-6fd88776-530e-11e8-9978-14aba8e883e1.png)

![image](https://user-images.githubusercontent.com/150329/39796973-8983189e-530e-11e8-8d82-92183c8590f6.png)
2018-05-08 22:27:31 -07:00
Alan Pierce
404aacfa46 Address review comments
* Switch to `bracketSpacing: false`.
* Add prettier-ignore in one case.
2018-04-14 16:19:26 -07:00
Alan Pierce
1bcb88670b Set up Prettier and run it on the whole codebase
* Install prettier, set up the config file, and run it on all ts and tsx files.
* Install eslint and configure it with just eslint-plugin-prettier to check to
  make sure that prettier has been run.
* Add a basic .travis.yml that runs eslint.

There are other style things that might be nice to enforce with ESLint/TSLint,
like using const, import order, etc, but this commit just focuses on prettier,
which gets most of the way there.

One annoying issue for now is that typescript-eslint-parser gives a big warning
message since they haven't updated to officially support TypeScript 2.8 yet. We
aren't even using any ESLint rules that need the parser, but if we don't include
it, ESLint will crash. TS2.8 support is hopefully coming really soon, though:
https://github.com/eslint/typescript-eslint-parser/pull/454

As for the prettier config specifically, see https://prettier.io/docs/en/options.html
for the available options.

Config settings that seem non-controversial:

Semicolons: You don't use semicolons. (I prefer semicolons, but either way is fine.)

Quote style: Looks like you consistently use single quotes outside JSX and double
quotes in JSX, which is the `singleQuote: true` option.

Config settings worth discussion:

Line width: You don't have a specific max. I put 100 since I think it's a good number
for people (like both of us, probably) who find 80 a bit cramped. (At Benchling we use
110.) Prettier has a big red warning box recommending 80, but I still prefer 100ish.

Bracket spacing: This is `{foo}` vs `{ foo }` for imports, exports, object literals,
and destructuring. Looks like you're inconsistent but lean toward spaces. I personally
really dislike bracket spacing (it feels inconsistent with arrays and function calls),
but I'm certainly fine with it and Prettier has it enabled by default, so I kept it
enabled.

Trailing comma style: Options are "no trailing commas", "trailing commas for
everything exception function calls and parameter lists", and "trailing commas
everywhere". TypeScript can handle trailing commas everywhere, so there isn't a
concern with tooling. You're inconsistent, and it looks like you tend to not have
trailing commas, but I think it's probably best to just have them everywhere, so I
enabled them.

JSX Brackets: You're inconsistent about this, I think. I'd prefer to just keep the
default and wrap the `>` to the next line.

Arrow function parens: I only found two cases of arrow functions with one param
(both `c => c.frame === frame`), and both omitted the parens, so I kept the
default of omitting parens. This makes it mildly more annoying to add a typescript
type or additional param, which is a possible reason for always requiring parens.

Everything else is non-configurable, although it's possible some places would be
better with a `// prettier-ignore` comment (but I usually try to avoid those).
2018-04-14 08:40:06 -07:00
Jamie Wong
5104e5cdcb
Demangle C++ symbols (#2)
This adds support for demangling C++ symbols automatically (they'll have a name prefix of `__Z`).
2018-04-05 00:27:03 -07:00
Jamie Wong
1987e83bde
Upgrade libraries & change release procedure (#8)
Previously, I was doing a hacky release process where I had `index.html` serve contents for `jlfwong.github.io/speedscope`, but used `dev.html` locally. This seems like it broke with the latest parcel release, so I just revamped the release process instead.

Now, the `release.sh` script creates a temporary shallow clone of the repository, overwrites its contents with build artifacts, runs a local server to verify it's working, then commits and pushes to the `gh-pages` branches.
2018-04-05 00:15:42 -07:00
Jamie Wong
88eb8068cb Faster Chrome profile import 2018-01-17 11:00:39 -08:00
Jamie Wong
c15f4c4764 WIP faster import from Chrome timelines 2018-01-16 23:32:22 -08:00
Jamie Wong
ebb1627f76 Toolbar changes 2018-01-07 16:18:41 -08:00
Jamie Wong
f72ea82146 Tweaks to value formatting 2018-01-07 08:36:11 -08:00
Jamie Wong
2188025165 Basic horizontal axis labelling 2018-01-07 08:36:11 -08:00
Jamie Wong
ffc82360c0 Alternative sorting solution 2017-12-31 19:51:26 -05:00
Jamie Wong
9ee5b53eda Rename times to weights, start refactor for sorted flamegraphs 2017-12-31 18:25:37 -05:00
Jamie Wong
5932111819 Conversion to more efficient flamechart construction methodology 2017-12-31 14:57:38 -05:00
Jamie Wong
813a94c83f Add alphabetical sort order 2017-12-17 20:31:27 -08:00
Jamie Wong
355ceb8c6c Switch to browserify for better iteration time 2017-12-14 00:30:35 -08:00
Jamie Wong
15aa924583 Importing from brendangregg/FlameGraph format 2017-12-07 22:27:28 -08:00
Jamie Wong
e4c378d8ea Cumulative timings 2017-12-07 21:24:13 -08:00
Jamie Wong
1fe93d831f More useful hovertips 2017-12-07 21:08:12 -08:00
Jamie Wong
472d22b776 Semantic color assignment 2017-11-26 19:22:16 -08:00
Jamie Wong
facc492310 Start of flamechart code 2017-11-22 17:11:15 -08:00
Jamie Wong
f82733d0ef Import from stackprof to convenient in-memory format 2017-11-22 00:00:31 -08:00