Sometimes, the existing Mix tasks just aren't enough. Fortunately, Mix allows the creation of customized tasks that integrate as if they were shipped with Mix itself. In this recipe, we will create a custom Mix task that will print the Erlang VM memory status.
The steps required to create a custom task are as follows:
meminfo.ex, that defines the
defmodule Mix.Tasks.Meminfo do use Mix.Task end
mix helpis invoked:
@shortdoc "Get Erlang VM memory usage information"
@moduledoc """ A mix custom task that outputs some information regarding the Erlang VM memory usage """