Module: Singed::ControllerExt::ClassMethods

Defined in:
lib/singed/controller_ext.rb

Instance Method Summary collapse

Instance Method Details

#flamegraph(target_action, ignore_gc: false, interval: 1000) ⇒ Object

Define an around_action to generate flamegraph for a controller action.



9
10
11
12
13
# File 'lib/singed/controller_ext.rb', line 9

def flamegraph(target_action, ignore_gc: false, interval: 1000)
  around_action(only: target_action) do |controller, action|
    controller.flamegraph(ignore_gc: ignore_gc, interval: interval, &action)
  end
end