Class: Mnemosyne::Probes::ActiveRecord::Instantiation::Probe
- Inherits:
-
Mnemosyne::Probe
- Object
- Mnemosyne::Probe
- Mnemosyne::Probes::ActiveRecord::Instantiation::Probe
- Defined in:
- lib/mnemosyne/probes/active_record/instantiation.rb
Instance Method Summary collapse
Methods inherited from Mnemosyne::Probe
#install, #setup, subscribe, subscriptions
Methods included from Logging
Instance Method Details
#call(trace, _name, start, finish, _id, payload) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'lib/mnemosyne/probes/active_record/instantiation.rb', line 10 def call(trace, _name, start, finish, _id, payload) start = ::Mnemosyne::Clock.to_tick(start) finish = ::Mnemosyne::Clock.to_tick(finish) = { count: payload[:record_count], class_name: payload[:class_name] } span = ::Mnemosyne::Span.new 'db.instantiation.active_record', start: start, finish: finish, meta: trace << span end |