diff options
author | 2023-04-15 08:49:04 -0700 | |
---|---|---|
committer | 2023-06-04 18:54:26 -0700 | |
commit | c16e7693832a40dbed5c9e0adf6e255e877fa564 (patch) | |
tree | 1c41a8ac9be353c96d8e7a2a58677510e5625eef /packages/bun-devtools/heap/v8.d.ts | |
parent | 5badc728d0313ef7a4366f7b08eef54bad27363c (diff) | |
download | bun-c16e7693832a40dbed5c9e0adf6e255e877fa564.tar.gz bun-c16e7693832a40dbed5c9e0adf6e255e877fa564.tar.zst bun-c16e7693832a40dbed5c9e0adf6e255e877fa564.zip |
Add types and sample heapsnapshot for JSC and V8
Diffstat (limited to 'packages/bun-devtools/heap/v8.d.ts')
-rw-r--r-- | packages/bun-devtools/heap/v8.d.ts | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/packages/bun-devtools/heap/v8.d.ts b/packages/bun-devtools/heap/v8.d.ts new file mode 100644 index 000000000..ce57965c0 --- /dev/null +++ b/packages/bun-devtools/heap/v8.d.ts @@ -0,0 +1,30 @@ +export namespace V8 { + /** + * @link https://github.com/julianburr/chrome-heap-snapshot-parser/blob/master/index.js#L72 + * @link https://stackoverflow.com/questions/69802133/chrome-heap-snapshot-structure-explanation + */ + export type HeapSnapshot = { + snapshot: { + meta: { + node_fields: string[]; + node_types: [string[], ...string[]]; // ? + edge_fields: string[]; + edge_types: [string[], ...string[]]; // ? + trace_function_info_fields: string[]; + trace_node_fields: string[]; + sample_fields: string[]; + location_fields: string[]; + node_count: number; + edge_count: number; + trace_function_count: number; + }; + }; + nodes: number[]; + edges: number[]; + trace_tree: unknown[]; + trace_function_infos: unknown[]; + samples: unknown[]; + locations: number[]; + strings: string[]; + }; +} |