Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonwilliams committed May 30, 2020
1 parent 599dd5a commit 9ed6b71
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ tests/js/test.js
*.string_data
*.string_index
*.events
chrome_profiler.json
chrome_profiler.json
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@ $ yarn serve
In the console you can use `window.evaluate` to pass JavaScript in
To develop on the web assembly side you can run `yarn serve` then go to `http://localhost:8080`

## Roadmap

See Milestones

## Changelog

see [CHANGELOG](./CHANGELOG.md)
Expand All @@ -66,6 +62,10 @@ see [CHANGELOG](./CHANGELOG.md)
- Run with `cargo run -- test.js` where `test.js` is an existing JS file
- If any JS doesn't work then it's a bug. Please raise an issue!

## Profiling

See [Profiling](./docs/profiling.md)

## Command-line Options

```
Expand Down
11 changes: 10 additions & 1 deletion docs/profiling.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,19 @@ We use a crate called [measureme](https://github.com/rust-lang/measureme), which

## How To Use

### Prerequesites

- [Crox](https://github.com/rust-lang/measureme/blob/master/crox/Readme.md) installed

You can run boa using the "profiler" feature flag to enable profiling. Seeing as you'll most likely be using boa_cli you can pass this through, like so:

`cargo run --features Boa/profiler ../tests/js/test.js`

Once finished you should see some trace files left in the directory (boa_cli in this case).
In the same directory as the `.events, string_data, string_index` files run `crox my_trace` or whatever the name of the files are. This will generate a chrome_profiler.json file, you can load this into Chrome Dev tools.

## More Info

https://blog.rust-lang.org/inside-rust/2020/02/25/intro-rustc-self-profile.html
- https://blog.rust-lang.org/inside-rust/2020/02/25/intro-rustc-self-profile.html
- https://github.com/rust-lang/measureme
- https://github.com/rust-lang/measureme/blob/master/crox/Readme.md

0 comments on commit 9ed6b71

Please sign in to comment.