Skip to content

Commit 9ed6b71

Browse files
committed
updates
1 parent 599dd5a commit 9ed6b71

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ tests/js/test.js
2222
*.string_data
2323
*.string_index
2424
*.events
25-
chrome_profiler.json
25+
chrome_profiler.json

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,6 @@ $ yarn serve
5252
In the console you can use `window.evaluate` to pass JavaScript in
5353
To develop on the web assembly side you can run `yarn serve` then go to `http://localhost:8080`
5454

55-
## Roadmap
56-
57-
See Milestones
58-
5955
## Changelog
6056

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

65+
## Profiling
66+
67+
See [Profiling](./docs/profiling.md)
68+
6969
## Command-line Options
7070

7171
```

docs/profiling.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,19 @@ We use a crate called [measureme](https://github.com/rust-lang/measureme), which
99

1010
## How To Use
1111

12+
### Prerequesites
13+
14+
- [Crox](https://github.com/rust-lang/measureme/blob/master/crox/Readme.md) installed
15+
1216
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:
1317

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

20+
Once finished you should see some trace files left in the directory (boa_cli in this case).
21+
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.
22+
1623
## More Info
1724

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

0 commit comments

Comments
 (0)