Class: SearchFlip::NullInstrumenter

Inherits:
Object
  • Object
show all
Defined in:
lib/search_flip/null_instrumenter.rb

Instance Method Summary collapse

Instance Method Details

#finish(_name, _payload) ⇒ Object



17
18
19
# File 'lib/search_flip/null_instrumenter.rb', line 17

def finish(_name, _payload)
  true
end

#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

#start(_name, _payload) ⇒ Object



13
14
15
# File 'lib/search_flip/null_instrumenter.rb', line 13

def start(_name, _payload)
  true
end