Commit Graph

64 Commits

Author SHA1 Message Date
Jamie Wong
2077a905a9
Upgrade TypeScript from 3.2.4 to 3.9.2 (#266) 2020-05-16 17:02:51 -07:00
Justin Beckwith
56f6459af9
Bump parcel and audit fix (#264) 2020-05-16 16:44:45 -07:00
Jamie Wong
d30bb2ef7e
Fix the build for node 13.x, make travis test 10, 12, 13, stable (#263)
@JustinBeckwith pointed out in #262 that `npm install` was broken in node 13.x, and @DanielRuf pointed in #254 that test fail for node 11+ because of a change to stability of sorting.

This PR seeks to address both of those.

The installation issue was fixed by just regenerating `package-lock.json` without needing to bump any of the direct dependency versions. The test failure issue requires manual intervention.

To fix the sort stability issue, I updated the tests to use the stable sort values (these were all the correct values, though some of the test values were incorrect).

To make the suite still pass for node 10, I added a hack where I override `Array.prototype.sort` with a stable implementation that's *only* used in tests (See comments in code for a justification for why)

## Test Plan

Before this PR: `npm install` on node 13.x fails & `npm run jest` results in test failures
After this PR: `npm install` on node 13.x passes & `npm run jest` passes for node 10, 12, and 13.
2020-04-20 08:26:59 -07:00
Jamie Wong
707462e9cf 1.5.3 2020-01-16 00:09:07 -08:00
Jamie Wong
375040e892
Bump dependency versions to unbreak build (#253)
I ended up in a horrible peer dependency hell and apparently needed to bump the versions of quicktype, typescript, ts-jest, *and* jest to get out of it. But I think I got out of it!

Local builds and deployment builds both seem to work after these changes.
2020-01-15 23:32:14 -08:00
Jonathan Chan
c3074b7343 1.5.2 2019-10-10 18:27:28 -07:00
Jamie Wong
bd546ca893 1.5.1 2019-06-06 00:07:14 -07:00
Jamie Wong
30ca6291ca 1.5.0 2019-02-17 18:38:17 -08:00
Jamie Wong
c706bdfe04 Revert "Support importing partial JSON files (#202)"
This reverts commit cfc8fe8f6e.
2019-02-08 18:33:30 -08:00
Marcin Kolny
cfc8fe8f6e Support importing partial JSON files (#202)
Partial files are allowed in many specs, e.g. Trace Event Format,
so the viewer should be able to load partial files as well.
2019-02-08 18:08:51 -08:00
Jamie Wong
ddc61302e8 1.4.1 2019-01-22 21:53:09 -08:00
Jamie Wong
7cca1a76bc 1.4.0 2019-01-22 12:03:31 -08:00
Jamie Wong
519847b489 1.3.2 2018-12-03 19:25:54 -08:00
Jamie Wong
ad49dacb29 1.3.1 2018-11-08 10:05:52 -08:00
Jamie Wong
23d4042e04 1.3.0 2018-10-29 09:56:06 -07:00
Jamie Wong
0fe0c454d3 1.2.0 2018-10-08 09:49:15 -07:00
Jamie Wong
7d0a3a2c59 1.1.0 2018-09-26 11:46:41 -07:00
Jamie Wong
3f205ec3e9
Add go tool pprof import support (#165)
This PR adds support for importing from Google's pprof format, which is a gzipped, protobuf encoded file format (that's incredibly well documented!) The [pprof http library](https://golang.org/pkg/net/http/pprof/) also offers an output of the trace file format, which continues to not be supported in speedscope to date (See #77). This will allow importing of profiles generated by the standard library go profiler for analysis of profiles containing heap allocation information, CPU profile information, and a few other things like coroutine creation information.

In order to add support for that a number of dependent bits of functionality were added, which should each provide an easier path for future binary input sources

- A protobuf decoding library was included ([protobufjs](https://www.npmjs.com/package/protobufjs)) which includes both a protobuf parser generator based on a .proto file & TypeScript definition generation from the resulting generated JavaScript file
- More generic binary file import. Before this PR, all supported sources were plaintext, with the exception of Instruments 10 support, which takes a totally different codepath. Now binary file import should work when files are dropped, opened via file browsing, or opened via invocation of the speedscope CLI.
- Transparent gzip decoding of imported files (this means that if you were to gzip compress another JSON file, then importing it should still work fine)

Fixes #60.

--

This is a [donation motivated](https://github.com/jlfwong/speedscope/issues/60#issuecomment-419660710) PR motivated by donations by @davecheney & @jmoiron to [/dev/color](https://www.devcolor.org/welcome) 🎉
2018-09-26 11:33:34 -07:00
Jamie Wong
c70171836c 1.0.4 2018-09-12 18:22:59 -07:00
Jamie Wong
c9ba143eb6 1.0.3 2018-09-10 13:54:32 -07:00
Jamie Wong
2686a3ccc0 1.0.2 2018-09-04 20:55:25 -07:00
Jamie Wong
82867ab234 1.0.1 2018-08-23 10:01:13 -07:00
Jamie Wong
da2de64d97 1.0.0 2018-08-23 09:38:56 -07:00
Jamie Wong
03578ea7a4 0.7.1 2018-08-20 08:46:13 -07:00
Jamie Wong
2c89cefcdc
Replace regl with GPU apis ported from evanw/sky (#140)
Fixes #101 
Fixes #137
2018-08-19 11:37:47 -07:00
Jamie Wong
853164ebbf 0.7.0 2018-08-16 11:56:17 -07:00
Jamie Wong
729d7c771b
Add support for importing linux "perf script" output (#135)
Fixes #119
2018-08-16 10:24:12 -07:00
Jamie Wong
085d6298ec 0.6.0 2018-08-14 10:34:34 -07:00
Jamie Wong
aa35b17d20
Downgrade to TypeScript 2.8.1 to fix JSON schema generation (#133)
Fixes #132
2018-08-14 09:37:42 -07:00
Jamie Wong
e404053837 Add support for profiles w/ multiples processes & threads (#130)
More broadly, this just supports multiple profiles loaded into the editor in the same time, which supports import from profiles which are multithreaded by importing each thread as a different profile.

For now, the only two file formats that support multiprocess import are Instruments .trace files and speedscope's own file format

In the process of doing this, I refactored the container code considerably and extracted all the dispatch calls into containers rather than them being part of the non-container view code. This is nice because it means that views don't have to be aware of which Flamechart they are or which profile index is being operated upon.

Fixes #66
Fixes #82
Fixes #91
2018-08-11 22:06:53 -07:00
Jamie Wong
558e98d24d 0.5.1 2018-08-11 22:05:39 -07:00
Jamie Wong
7368e15396 0.5.0 2018-08-09 09:38:55 -07:00
Jamie Wong
94d0879417
Upgrade to TypeScript 3.0.1 (#110)
Fixes #103
2018-08-01 01:23:21 -07:00
Jamie Wong
608006232f
Reorganize directory structure (#104)
While it was kind of nice having everything at the top level, the number of files is now getting a bit unwieldy and hard to understand, so I took a stab at organizing the directories without introducing too much nesting.

Test Plan:
- Ran `npm run serve` to ensure that local builds still work
- Ran `npm run prepack` then `open dist/release/index.html` to ensure that release builds still work
- Ran `scripts/deploy.sh` to ensure that the deployed version of the site will still work when I eventually redeploy
- Ran `npm run jest` to ensure that tests still work correctly
2018-08-01 00:41:45 -07:00
Jamie Wong
11a3a67dce
Switch to redux for global state management (#100)
This should allow state to be more easily retained globally when switching views, and should make implementation of cross-view features like search easier too.

It also removes the need for `ReloadableComponent`

Fixes #78

Test Plan:
This changes a lot of how the app works, and a lot of stuff that isn't currently covered by tests, so here's a rough manual test plan:

1. Loaded up http://localhost:1234/, click to load the example profile
2. Switch between views, see that viewport & selection position is now retained when switching views
3. See that clicking on nodes selects them in Time Order & Left Heavy views
4. See that hitting Cmd+S saves a profile
5. See that dropping a profile in works
6. See that dropping a profile + a symbol map works
7. See that visiting localhost:1234/#profileURL=https://raw.githubusercontent.com/jlfwong/speedscope/master/sample/profiles/speedscope/0.1.2/simple-sampled.speedscope.json works
8. See that hitting "r" to toggle recursion flattening works
2018-07-31 23:53:56 -07:00
Jamie Wong
2f95f77fcf 0.4.0 2018-07-21 19:44:57 -07:00
Jamie Wong
ea8f982c10
Import from node profiles via v8 logs (#98)
This is inspired by https://github.com/mapbox/flamebearer
2018-07-21 16:00:25 -07:00
Jamie Wong
d7969ac2b8 0.3.0 2018-07-18 08:54:53 -07:00
Jamie Wong
8fcc0f8108 0.2.0 2018-07-14 00:35:58 -07:00
Jamie Wong
6aa66bead2 Start with loading bar enabled when loading a local profile 2018-07-07 23:12:03 -07:00
Jamie Wong
bcecf9c260 Set name to filename by default 2018-07-07 23:05:49 -07:00
Jamie Wong
3172e61f05
Add a CLI to load the target file in your default browser (#88)
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
2018-07-07 21:33:02 -07:00
Jamie Wong
e39381e498
Specify file format for speedscope (#83)
This defines a JSON-based file format for speedscope.

The motivation for is primarily two things:
1. To enable others to write tools to output profiles which can be read by speedscope
2. To enable others to write tools to handle the output of speedscope, leveraging the variety of importers that speedscope supports

Fixes #65
2018-07-07 18:37:28 -07:00
Jamie Wong
94f0875dc0 Upgrade parcel-bundler to 1.9.2 2018-06-30 15:44:46 -07:00
Jamie Wong
721246752f Setup for publish 2018-05-31 00:24:24 -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
d23660d13c
Add test coverage reporting (#55)
This adds an integration with https://coveralls.io/ to report on code coverage of tests
2018-05-29 19:59:04 -07:00
Jamie Wong
3aa0944f94
Add tests for Vec2, Rect, and AffineTransform (#52)
* Tests for clamp, Vec2

* Switch to using jsverify for testing math functions

* Add tests for AffineTransform

* Add tests for Rect

* Add tests for rect transformations
2018-05-29 17:05:04 -07:00
Jamie Wong
aee4534de4
Integrate jest and add first test file (#51)
This sets up the first bit of test infrastructure to write and run unit tests on every PR

Related to #14 
Fixes #7
2018-05-29 14:34:09 -07:00
Jamie Wong
274110a46b
Support importing time profiles from Instruments .trace files (#41)
#33 added support for importing from instruments indirectly via opening instruments and using the deep copy command. This PR adds support for importing `.trace` files directly, though only for time profiles specifically, and only for the highest sample count thread in the profile.

This PR adds `.trace` files from Instruments 9, and adds support for importing from either Instruments 8 and 9. The only major difference in the file format seems to be that Instruments 9 applies raw `zlib` compression generously throughout the file.

This PR also adds example `.trace` files for memory allocations, which are not supported for direct import. They use a totally different storage format for recording memory allocations, and I haven't yet figured out how that list of allocations references their corresponding callstack.

Lastly, this PR also adds examples from Instruments 7 since I happen to have a machine with an old version of Instruments. Import from Instruments 7 probably wouldn't be hard to add, but I haven't done that in this PR.

This currently only works in Chrome, and only via drag-and-drop of the files.

To test, drag the decompressed `simple-time-profile.trace` from 6016d970b9/sample/profiles/Instruments/9.3.1/simple-time-profile.trace.zip onto speedscope.

The result should be this:

![image](https://user-images.githubusercontent.com/150329/40162338-8fa13502-5968-11e8-8fb3-40626e41884a.png)

Fixes #15
2018-05-17 00:33:09 -07:00