View Source Benchee.Profile (Benchee v1.3.1)

Profiles each scenario after benchmarking them if the profile_after option is either set to:

  • true,
  • a valid profiler,
  • a tuple of a valid profiler and a list of options to pass to it, e.g., {:fprof, [sort: :own]}.

The profiler that will be used is either the one set by the profiler_after option or, if set to true, the default one (:eprof). It accepts however the following profilers:

  • :cprof will profile with Mix.Task.Profile.Cprof. It provides information related to the number of function calls.
  • :eprof will profile with Mix.Task.Profile.Eprof. It provides information related to the time spent on each function in regard to the total execution time.
  • :fprof will profile with Mix.Task.Profile.Fprof. It provides information related to the time spent on each function, both the total time spent on it and the time spent on it, excluding the time of called functions.

Summary

Functions

List of supported builtin profilers as atoms.

Returns the atom corresponding to the default profiler.

Runs for each scenario found in the suite the profile/2 function from the given profiler.

Functions

List of supported builtin profilers as atoms.

@spec default_profiler() :: :eprof

Returns the atom corresponding to the default profiler.

Link to this function

profile(suite, printer \\ Printer)

View Source
@spec profile(Benchee.Suite.t(), module()) :: Benchee.Suite.t()

Runs for each scenario found in the suite the profile/2 function from the given profiler.