It is recommended to investigate generating flamegraphs with rust to achieve the goal.
This blogpost may contain some inspiration.
If flamegraph is not suitable, the implementer is also required to suggest other approach to achieve the goal.
There could be multiple approaches to be used to profile and cross check the results.
The implementer can raise any further tasks that related to achieve this goal.