How to debug function times?

I’m using a library that mysteriously has a 5 second hang when I call it.

I am looking for a debug tool which will let me analyze every single function that is getting called, as well as the time spent on it (ideally on execution time and not waiting time for inner functions to get triggered.

I basically want to figure out what lib funciton is it getting stuck on when these random hangs happen.

I tried using eflame to make a flame chart but it wasnt helpful at all

What seemed to be the problem with eflame?

Have you tried profiling using fprof?

1 Like

Or eprof and cprof.

All three can be called with mix like mix profile.fprof -e ....

1 Like

The graph is literally just a super wide block of lines with ‘sleep’ at the top. Theres no actual “flame”, it just looks like a square. When I take a flame chart when it doesnt hang, there are flames but sleep is still the top one… so I don’t know what that means.

Awesome thanks guys :smiley: