[erlang-questions] trouble with erlang or erlang is a ghetto
Jesper Louis Andersen
Tue Jul 26 22:23:54 CEST 2011
On Tue, Jul 26, 2011 at 21:45, Joel Reymont <joelr1@REDACTED> wrote:
> What you really want is to know what happens along the request processing path. It took N seconds to process the request. Where did this time go? You want to average this over hundreds of requests and see where the bottlenecks are. Do you really want this? You are out of luck, I'm sorry. No tools exist to help you.
I agree this thing would be really neat to have. To make it somewhat
efficient, I'd definitely propose an sFlow-like approach. Add a flag
to erlang:trace/3 such that we can trace a function based upon a
sampling value. For instance, that 1/8192 messages on average is
traced. Together with call/return we now know how much time was spent
in that function as a whole. If you also add dependent trace probes
(if the 1/8192 trigger, then these should be enabled as well) you
should in principle be able to build such a tool out of the trace
facilities. It is *almost* there.
More information about the erlang-questions