Search code examples
erlangprofilingrebarrebar3

Using profiling tools with rebar


I'm using rebar3 to build my application. I need to track down some performance problems and want to use fprof but it doesnt seem to be included in the release made by rebar.

How can I get fprof (or eprof) included in the rebar release?


Solution

  • Add the application tools to the relx section to your project's rebar.config:

    {relx, [{release, {<release name>, "0.0.1"},
             [<app>,tools]},
    
            {dev_mode, true},
            {include_erts, false},
    
            {extended_start_script, true}]}.
    

    tools is the application containing fprof module.

    For using the fprof module, this is a good entry-level explanation from the erlang mailing list. Here are other profiling tools applicable to erlang.