-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get heap statistics from deno (#558)
This adds a planner event to request V8 heap statistics. This data is gathered from the JS side because the related methods from the rust side require a `&mut` access to the runtime, which is impossible since it already runs in an infinite loop. Since we elected to not run the prelude parts of deno which register functions like `Deno.memory_usage`, we intern the [op_runtime_memory_usage function](https://github.com/denoland/deno/blob/897159dc6e1b2319cf2f5f09d8d6cecc0d3175fa/runtime/ops/os/mod.rs#L329) and import it directly as a host function, as we've done already with `op_crypto_get_random_values`. To avoid hosting too much code, the `rss` field is not filled (it needs platform specific functions), since that info can generally be obtained by other means.
- Loading branch information
Showing
3 changed files
with
101 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters