Profiling

Learn about profiling and understand how it works.

We'll cover the following...

What is profiling?

Profiling is a performance tuning technique that primarily measures the frequency and duration of function calls. Erlang/OTP ships with three profilers.

  1. The cprof profiler counts the number of invocations.

  2. The eprof profiler measures execution time.

  3. The fprof profiler measures both frequency and time.

Each has its own advantages and disadvantages. cprof runs quite fast and has a minimal impact on execution times, but doesn’t tell us as much as full execution times. On the other hand, fprof provides much more data, but it impacts our execution time.

Elixir provides integration with cprof, eprof, and fprof via the Mix tool. ...