How to find the 🐢 slowest N modules in test suite

Notes

If you want to improve your test suite speed, the first thing we want to do is find out what’s the slowest module we have, right?

Elixir 1.17 ships with a really cool mix test flag that helps us do just that! 🎉

We can request ExUnit to print info about the N slowest modules:

mix test --slowest-modules 2

Voilà! ExUnit will run and at the end, it’ll print the slowest 2 modules.

Want the latest Elixir Streams in your inbox?

    No spam. Unsubscribe any time.