Method: SearchFlip::NullInstrumenter#instrument

Defined in:
lib/search_flip/null_instrumenter.rb

#instrument(name, payload = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'lib/search_flip/null_instrumenter.rb', line 3

def instrument(name, payload = {})
  start(name, payload)

  begin
    yield(payload) if block_given?
  ensure
    finish(name, payload)
  end
end