FuelLabs / fuel-debugger

Debugger for Fuel v2
Other
8 stars 4 forks source link

Gas usage flamegraph #3

Open Voxelot opened 2 years ago

Voxelot commented 2 years ago

We should be able to visualize gas usage from VM profile files. It should look something like this:

https://pbs.twimg.com/media/FN5qaEiXsAY1C9g.jpg

Currently this is not as useful as it would be, because Sway inlines all function calls. The compiler provides no mapping for locating the original calling function, meaning that nested scopes seen in the image above are unavailable. This also makes it impossible to get proper code coverage reports at the moment.

Dentosal commented 2 years ago

Waiting for https://github.com/FuelLabs/sway/issues/1557 or a source map -based workaround