Skip to content

Commit

Permalink
DOC: write_heap_snapshot (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
jjaffeux committed May 18, 2020
1 parent 4f40f41 commit 23e0369
Showing 1 changed file with 10 additions and 0 deletions.
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

0 comments on commit 23e0369

Please sign in to comment.