I’d like to find out what function calls are taking the most time in my tests. I feel like I should be able to do
mix profile.fprof -e "Mix.Tasks.Test.run()"
but this generates an error:
** (Mix) “mix test” is running in the “dev” environment. If you are running tests from within another command, you can either:
- set MIX_ENV explicitly:
MIX_ENV=test mix test.another
- set the :preferred_cli_env for a command inside “def project” in your mix.exs:
preferred_cli_env: [“test.another”: :test]
When I include preferred_cli_env: [“test.another”: :test] in the mix.exs I get the same erro. Same with setting the env variable. Any suggestions?
Nevermind, ban user. Typo in setting the env variable. Corrected that and it worked.