Open bjesuiter opened 1 month ago
Try bun --inspect
Looks like some wrapper object is missing. This makes it valid and shows some information, but it's still not what it should be:
await Bun.write(
`heap-${dateFileString}.json`,
JSON.stringify({
version: 1,
recording: {
displayName: "Recording",
discontinuities: [],
instrumentTypes: [
"timeline-record-type-heap-allocations"
],
records: [{
"type": "timeline-record-type-heap-allocations",
"title": "Snapshot",
"snapshotStringData": JSON.stringify(snapshot)
}],
markers: [],
memoryPressureEvents: [],
sampleStackTraces: [],
sampleDurations: []
},
overview: {}
}, undefined, 2)
)
What is the type of issue?
Example code is not working
What is the issue?
When I use this example code:
the generated json file cannot be imported into the Safari Timeline view, it produces this error:
=> Apparently the JSON is incorrect.
My Code:
My Heap Files
heap-2024-08-16 16_24_26_551.json
heap-2024-08-16 16_24_26_560.json
Where did you find it?
https://bun.sh/docs/project/benchmarking#javascript-heap-stats