You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been able to save heap snapshots from a running Flutter application to CSV within the devtools. I can also save a memory heap snapshot programmatically from my Flutter application with NativeRuntime.writeHeapSnapshotToFile.
How do I convert the saved heap snapshot to csv or other human readable form? I'd like to parse the saved snapshot instead of viewing it in the devtools UI. Thanks
The text was updated successfully, but these errors were encountered:
Run DevTools not connected to the app (for example with VSCode > Flutter Side Panel > Icon "Open DevTools")
Open DevTools > Memory
Click arrow up button to import the snapshot
Save the snapshot as CSV.
@polina-c , thank you very much for responding. I should have been clearer.
I understand how to manually upload the heap snapshot my flutter app saves to my device emulator with NativeRuntime.writeHeapSnapshotToFile and manually convert it to a CSV.
What I would like to find is a programmatic way in my flutter program or a separate dart script to just convert the heapsnapshot to a csv without the step to manually upload the heapsnapshot to flutter devtools and then manually save it as a csv.
My goal is to programmatically take a heap snapshot at different points in my flutter app and automatically compare the values to figure out which widgets are responsible for my memory leakage. Thanks
Or is there a better way you could suggest, please? Thanks
Check source code of DevTools and copy the snippets from the Memory screen that are doing import of the snapshot. DevTools is doing a lot of calculations for the snapshot. May be you do not need them.
Then you can create your code to save it to CSV. Or, copy the one from DevTools.
I've been able to save heap snapshots from a running Flutter application to CSV within the devtools. I can also save a memory heap snapshot programmatically from my Flutter application with NativeRuntime.writeHeapSnapshotToFile.
How do I convert the saved heap snapshot to csv or other human readable form? I'd like to parse the saved snapshot instead of viewing it in the devtools UI. Thanks
The text was updated successfully, but these errors were encountered: