How to profile phx.server?

I spent hours to find out how to profile phx.server (in dev). Without success.
I am looking for something link (pseudo code)
“mix with eprof run phx.server”
or something equivalent in iex
or some hook in the application code

You usually do not profile the running server. That would in best case only give you a profile of the connection acceptor, but not the spawned processes that actually handle the request.

You need to profile the actual controllers or views you are interested in.

1 Like