Incendium.Decorator (Incendium v0.3.1) View Source

Defines decorators to profile function calls.

Link to this section Summary

Functions

Decorator. When the decorated function is invoked, it will bd profiled using tracing.

Link to this section Functions

Link to this macro

incendium_profile_with_tracing()

View Source (macro)
Link to this function

incendium_profile_with_tracing(body, context)

View Source

Decorator. When the decorated function is invoked, it will bd profiled using tracing.

Stack data will be written to incendium/stacks.out.

Note: profiling will be disabled if Mix.env() == :prod. This means it's safe(ish) to leave these decorators in a production environment. It's never a good idea to profile in prod using the :eflame library, as it makes your code run ~10x slower.

Example

defmodule MyApp.UserController do
  # ...
  use Incendium.Decorator

  @decorate incendium_profile_with_tracing()
  def index(conn, params) do
    # ...
  end
end