Module: Sixty::Instrument::Pg::Patch
- Defined in:
- lib/sixty/instrument/pg.rb
Overview
Prepended rather than aliased, so super reaches the driver's own
implementation and an application that removes the gem's instrumentation
gets its untouched methods back.
Instance Method Summary collapse
Instance Method Details
#exec_prepared(*args, &block) ⇒ Object
186 187 188 189 190 191 192 |
# File 'lib/sixty/instrument/pg.rb', line 186 def exec_prepared(*args, &block) sql = Sixty::Instrument::Pg.prepared_sql(args[0]) # A statement prepared before the agent started has no text here. It is # measured under its own name rather than dropped, because a query # nobody can see is worse than one labelled by its statement name. Sixty::Instrument::Pg.measure(sql || "prepared #{args[0]}") { super } end |
#prepare(*args, &block) ⇒ Object
181 182 183 184 |
# File 'lib/sixty/instrument/pg.rb', line 181 def prepare(*args, &block) Sixty::Instrument::Pg.remember_prepared(args[0], args[1]) super end |