Class: Speedup::Collectors::QueriesCollector
- Inherits:
-
Collector
- Object
- Collector
- Speedup::Collectors::QueriesCollector
show all
- Defined in:
- lib/speedup/collectors/queries_collector.rb
Instance Method Summary
collapse
Methods inherited from Collector
#context_id, #dom_id, #enabled?, #initialize, key, #key, #parse_options, #register, #render?, #store_event, #subscribe
Instance Method Details
#event_to_data(evt) ⇒ Object
14
15
16
|
# File 'lib/speedup/collectors/queries_collector.rb', line 14
def event_to_data(evt)
{time: evt.time, duration: evt.duration, name: evt.payload[:name], query: evt.payload[:sql], backtrace: clean_trace}
end
|
#filter_event?(evt) ⇒ Boolean
10
11
12
|
# File 'lib/speedup/collectors/queries_collector.rb', line 10
def filter_event?(evt)
super || evt.payload[:name] =~ /schema/i
end
|
#setup_subscribes ⇒ Object
6
7
8
|
# File 'lib/speedup/collectors/queries_collector.rb', line 6
def setup_subscribes
register('sql.active_record')
end
|