Member-only story
How to profile a mix task
Sometimes it might be handy to see how long Elixir/Erlang has spent on a certain function.
If you have a standalone script, this is as easy as:

However, since we Elixir developers tend to work TDD, most of the code we’d like to profile is already in our test suite.
Then you can use:

And you’ll get something like:
