# `Benchee.Profile`
[🔗](https://github.com/bencheeorg/benchee/blob/1.5.1/lib/benchee/profile.ex#L1)

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`](https://hexdocs.pm/mix/Mix.Tasks.Profile.Cprof.html).
  It provides information related to the number of function calls.
  * `:eprof` will profile with [`Mix.Task.Profile.Eprof`](https://hexdocs.pm/mix/Mix.Tasks.Profile.Eprof.html).
  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`](https://hexdocs.pm/mix/Mix.Tasks.Profile.Cprof.html).
  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.

# `builtin_profilers`

List of supported builtin profilers as atoms.

# `default_profiler`

```elixir
@spec default_profiler() :: :eprof
```

Returns the atom corresponding to the default profiler.

# `profile`

```elixir
@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.

