Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOC: write_heap_snapshot #164

Merged
merged 1 commit into from May 18, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -315,6 +315,16 @@ context.eval("a = 2")
# nothing works on the context from now on, its a shell waiting to be disposed
```

A MiniRacer context can also be dumped in a heapsnapshot file using `#write_heap_snapshot(file_or_io)`

```ruby
context = MiniRacer::Context.new(timeout: 5)
context.eval("let a='testing';")
context.write_heap_snapshot("test.heapsnapshot")
```

This file can then be loaded in the memory tab of the chrome dev console.

### Function call

This calls the function passed as first argument:
Expand Down