Incendium.Decorator (incendium v0.2.0) 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
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